Albacore: Breaking Changes In Location Of Executables

I was working on cleaning up Albacore this weekend, and I noted that both the NCoverConsole and MSBuild tasks in Albacore both require the location of the .exe, to execute. The MSBuild task defaults itself to the .NET 3.5 SP1 folder, if none is specified, but the NCoverConsole task requires the path to be specified. With both of these requiring a path to the .exe file, it made sense to consolidate the functionality of storing the location and executing the command in a module. This would help to ensure consistency across all the tasks that need to execute something on the command line.


Breaking Change: ‘path_to_exe’ is now ‘path_to_command’

In the process of putting together the basic module for this, I decided that ‘path_to_exe’ is not the right setting name. Rather, ‘path_to_command’ is more appropriate, in case someone wants to use a .bat, .cmd or other executable file extension.


   1: desc "Run a sample build using the MSBuildTask"

   2: do |msb|

   3:   msb.path_to_command = "C:/Windows/Microsoft.Net/Framework/v3.5/MSBuild.exe"  


   5: :configuration => :Debug

   6:   msb.targets [:Clean, :Build]

   7:   msb.solution = "lib/spec/support/TestSolution/TestSolution.sln"

   8: end


   1: desc "Run a sample NCover Console code coverage"

   2: do |ncc|

   3:   ncc.path_to_command = "lib/spec/support/Tools/NCover-v3.2/NCover.Console.exe"


   5:   ncc.log_level = :verbose

   6:   ncc.output = {:xml => "lib/spec/support/CodeCoverage/test-coverage.xml"}

   7:   ncc.working_directory = "lib/spec/support/CodeCoverage"


   9:   nunit ="lib/spec/support/Tools/NUnit-v2.5/nunit-console.exe")

  10:   nunit.log_level = :verbose

  11:   nunit.assemblies << "assemblies/TestSolution.Tests.dll"

  12:   nunit.options << '/noshadow'


  14:   ncc.testrunner = nunit

  15: end


Breaking Change: no second parameter for MSBuildTask.New

Also – to keep things a little more consistent, I decided to remove the second parameter from the MSBuildTask initializer. You can no longer specify the path to the msbuild.exe in the initializer. Rather, you should specify it in the settings of the task, as shown in the above example.


Feedback Welcome

I always welcome feedback, especially with this project being in such an early stage and with so few tasks available, so far. If you liked the optional MSBuildTask initializer parameter, if you think path_to_exe is a better name, or if you have any other questions, comments, or suggestions, please drop me a line. The easiest way to do that is over on the Albacore Issues list, or through ‘Contact’ link in the sidebar of this page.

Post Footer automatically generated by Add Post Footer Plugin for wordpress.

About Derick Bailey

Derick Bailey is an entrepreneur, problem solver (and creator? :P ), software developer, screecaster, writer, blogger, speaker and technology leader in central Texas (north of Austin). He runs - the amazingly awesome podcast audio hosting service that everyone should be using, and where he throws down the JavaScript gauntlets to get you up to speed. He has been a professional software developer since the late 90's, and has been writing code since the late 80's. Find me on twitter: @derickbailey, @mutedsolutions, @backbonejsclass Find me on the web: SignalLeaf, WatchMeCode, Kendo UI blog, MarionetteJS, My Github profile, On Google+.
This entry was posted in Albacore, Rake, Refactoring, Ruby. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • Joe Feser

    NCover v3.3 is out and with many speed improvements, especially with merge.


    Joe Feser

  • derick.bailey

    Thanks for the info, Joe! I’ll get Albacore updated soon.