Albacore icon indicating copy to clipboard operation
Albacore copied to clipboard

Support all msbuild command line switches

Open AnthonyMastrean opened this issue 12 years ago • 1 comments

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 avatar Mar 06 '12 16:03 AnthonyMastrean

A switch set like this

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

should produce a command line like this

msbuild /nologo /maxcpucount:4

AnthonyMastrean avatar Mar 13 '12 18:03 AnthonyMastrean