Closed yankun closed 4 hours ago
9.0.1
Using SetProperty or SetProperties on the DotNetMSBuild configuration not passes the keys properly to msbuild. DotNetBuild is not affected by this.
As example
DotNetMSBuild( _ => _ .SetTargetPath(Solution) .SetConfiguration(Configuration) .EnableTreatWarningsAsErrors() .SetVerbosity(DotNetVerbosity.quiet) .EnableNoLogo() .SetProperties(new Dictionary<string, object>() { {"UseRazorBuildServer", true}, {"UseSharedCompilation", true}, {"MinVerBuildMetadata", $"{DateTime.Now:yyyy-MM-dd-hh-mm-ss}"} }) .DisableRestore());
Will result in following call:
dotnet msbuild MySolution.sln /property:Configuration=Debug /property:true /property:true /property:2024-11-25-04-55-52 /verbosity:quiet /nologo
Create a simple build and add a property to call msbuild, like .SetProperty("UseSharedCompilation", true)
Call to msbuild should be as before:
dotnet msbuild MySolution.sln /property:Configuration=Debug /property:UseRazorBuildServer=true /property:UseSharedCompilation=true /property:MinVerBuildMetadata=2024-11-25-04-55-52 /verbosity:quiet /nologo
Property keys are missing from the call.
No response
No
Usage Information
9.0.1
Description
Using SetProperty or SetProperties on the DotNetMSBuild configuration not passes the keys properly to msbuild. DotNetBuild is not affected by this.
As example
DotNetMSBuild( _ => _ .SetTargetPath(Solution) .SetConfiguration(Configuration) .EnableTreatWarningsAsErrors() .SetVerbosity(DotNetVerbosity.quiet) .EnableNoLogo() .SetProperties(new Dictionary<string, object>() { {"UseRazorBuildServer", true}, {"UseSharedCompilation", true}, {"MinVerBuildMetadata", $"{DateTime.Now:yyyy-MM-dd-hh-mm-ss}"} }) .DisableRestore());
Will result in following call:
dotnet msbuild MySolution.sln /property:Configuration=Debug /property:true /property:true /property:2024-11-25-04-55-52 /verbosity:quiet /nologo
Reproduction Steps
Create a simple build and add a property to call msbuild, like .SetProperty("UseSharedCompilation", true)
Expected Behavior
Call to msbuild should be as before:
dotnet msbuild MySolution.sln /property:Configuration=Debug /property:UseRazorBuildServer=true /property:UseSharedCompilation=true /property:MinVerBuildMetadata=2024-11-25-04-55-52 /verbosity:quiet /nologo
Actual Behavior
Property keys are missing from the call.
Regression?
No response
Known Workarounds
No response
Could you help with a pull-request?
No