Albacore - build .Net application with Rake

 

Rake is very popular in Ruby community framework to automate the building process.
Rake provides interesting language (internal DSL programmed in Ruby) to describe the build routines.
 
Albacore is suite of Rake tasks that are very useful to build .Net application like running MSBuild, updating AssemblyInfo and etc.
 
How to start
 
First need to setup environment
1.       Install Ruby - I used IronRuby (http://ironruby.codeplex.com/) but it's not must
 
2.       Install next libraries with Gem (in case of IronRuby use igem)
1.       Install Rake with next command
 igem install rake
2.       Install Albacore with next commands
igem install albacore
 
 
All installed Ruby utilities (like 'igem' or 'rake') are located in Ruby setup folder (for ex. C:\Program Files\IronRuby 1.0v4\bin)
 
Define sample build
Sample build will update release version and build solution with MSBuild.
 
require 'rubygems'
require 'albacore'
     
 namespace :albacore do
    desc "Build project"
    task :sample => ['albacore:assemblyinfo', 'albacore:msbuild']
		
    desc "Build solution with MSBuild"
    Rake::MSBuildTask.new(:msbuild) do |msb|
		msb.properties :configuration => :Debug
        msb.targets [:Clean, :Build]
        msb.solution = "AutoMapperStuff.sln"
    end
	
    desc "Update assembly info"
    Rake::AssemblyInfoTask.new(:assemblyinfo) do |asm|
      asm.output_file = "Properties/AssemblyInfo.cs"
      asm.version = "1.2.3.4"
      asm.copyright = "Copyright (c)2009 MyCompany."
    end

end
 
Save the build file as rakefile.rb in project folder.
 
Run sample build
Go to project folder(cd) and run the build process with next command
rake albacore:sample
 
 
Albacore project site http://albacorebuild.net/
 

 

Thank you for your interest!

We will contact you as soon as possible.

Send us a message

Oops, something went wrong
Please try again or contact us by email at info@tikalk.com