derickbailey/Albacore — Issue #197: Support all msbuild command line switches
Author: AnthonyMastrean
Created: 2012-03-06 16:03:43+00:00
State: open

Support the [msbuild command line switches][cmd] 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][mspec] have [a mechanism for collection switches][switch]. 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 " "

[cmd]: http://msdn.microsoft.com/en-us/library/ms164311.aspx
[switch]: https://github.com/machine/machine.specifications/blob/master/Tools/Rake/msbuild.rb#L37
[mspec]: https://github.com/machine/machine.specifications