I just added an MsBuild task for rubicant tonight. I’m not very familiar with the command line options for MsBuild so some of these could probably be improved a bit, but until I know more I will leave them as they are.
The MsBuild Task is used to create tasks which will use MsBuild. This should help with people who need to build WPF applications (since MsBuild is the only way right now), or (fingers crossed) migrate from MsBuild.
The MsBuild Task is used as follows:
1: MsBuildTask.new(:task_name => :dependencies) do |msb|
2: msb.no_autoresponse
3: msb.target
4: msb.logger
5: msb.distributed_logger
6: msb.console_logger_parameters
7: msb.validate
8: msb.verbosity
9: msb.no_console_logger
10: msb.max_cpu_count
11: msb.ignore_project_extensions
12: msb.file_logger
13: msb.distributed_file_logger
14: msb.node_reuse
15: msb.properties
16: msb.file_logger_parameters
17: msb.project_file
18: end
Each of setters matches a command line option for MsBuild. For more information on what each one does, please view the documentation at http://msdn.microsoft.com/en-us/library/ms164311.aspx.
Values that can only be set (for example, /noautoresponse) can be set to true (set) or nil (unset).
Values, such as /property that take a list of option settings, must be passed a hash where the keys are the options and the values are the option values. For example, to set the output directory and Warning Level for a csproj compile, you could use:
1: MsBuildTask.new(:compile) do |msb|
2: msb.properties = { :OutputDir => ".\\Output", :WarningLevel => 2 }
3: msb.project_file = ".\\Project1\\project.csproj"
4: end
As of yet, I haven’t added an MsBuild helper to help create this function. I will probably get this done fairly shortly.