Breaking change to passing multiple properties as /p:P1=V1;P2=V2
See original GitHub issueI believe this was changed by https://github.com/dotnet/cli/pull/9153
Steps to reproduce
- Create test.proj with the following content
<Project>
<Target Name="Build">
<Message Importance="High" Text="A: $(A)" />
<Message Importance="High" Text="B: $(B)" />
</Target>
</Project>
dotnet build test.proj /p:A=1;B=2 /nologo /clp:NoSummary
Expected behavior
A: 1
B: 2
Actual behavior
A: 1;B=2
B:
Environment data
.NET Core SDK (reflecting any global.json):
Version: 2.2.100-preview1-008941
Commit: dae5099ffb
Runtime Environment:
OS Name: Windows
OS Version: 10.0.17134
OS Platform: Windows
RID: win10-x64
Base Path: d:\src\s\sdk\.dotnet\sdk\2.2.100-preview1-008941\
Host (useful for support):
Version: 2.1.0-rtm-26515-03
Commit: caa7b7e2ba
.NET Core SDKs installed:
2.2.100-preview1-008941 [d:\src\s\sdk\.dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.0-rtm-30752 [d:\src\s\sdk\.dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.0-rtm-30752 [d:\src\s\sdk\.dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 1.0.5 [d:\src\s\sdk\.dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.2 [d:\src\s\sdk\.dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.0 [d:\src\s\sdk\.dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.0-rtm-26515-03 [d:\src\s\sdk\.dotnet\shared\Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Changing fields to property is a breaking change under ...
You can't change fields to properties if you are using reflection on the class. This is obvious even though I don't have details....
Read more >[build] Passing a property (/property) with multiple values to ...
I need to pass values for NoWarn option to C# compiler. Previously with msbuild it was being passed as property: msbuild /p:NoWarn:"1591 ...
Read more >Dealing with limited breaking changes in C# #7033
Introducing a field field somewhere outside the property can nullify the language feature and inadvertently change the meaning of occurrences of ...
Read more >Multi-bindings - .NET MAUI
In .NET MAUI, a collection of Binding objects can be attached to a single binding target property using the MultiBinding class.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m ready to commit to that. I think it’s the least-bad option. @AndyGerlicher objections?
Ah, I see the crux of the problem then. If MSBuild decided on option 4, then I’d be in favor of reverting dotnet/cli#9153 and ask users to do the same for
dotnet
(escape quotes around the property value) and to not try anything fancy from our side.