mxriverlynn / Albacore

Dolphin-Safe Rake Tasks For .NET Systems
http://albacorebuild.net
239 stars 71 forks source link

Support all msbuild command line switches #197

Open AnthonyMastrean opened 12 years ago

AnthonyMastrean commented 12 years ago

Support the msbuild command line switches that are not already supported. That includes the ones that are true switches (/nologo) and the ones that have goofy :properties (like /fileloggerparameters).

msbuild.exe /nologo /maxcpucount /fileloggerparameters:verbosity=diagnostic

The guys over on MSpec have a mechanism for collecting switches. I don't know if it's good or idiomatic, but it's a start.

switches = switches.collect { |key, value|
    "/#{key}#{":#{value}" unless value.kind_of? TrueClass or value.kind_of? FalseClass}" if value
}.join " "

I would love the opportunity to add this enhancement and send you a pull request. But I wanted to leave this issue here just in case someone else was faster.

AnthonyMastrean commented 12 years ago

A switch set like this

switches = {
    'nologo' => :true,
    'maxcpucount' => 4
}

should produce a command line like this

msbuild /nologo /maxcpucount:4