dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.6k stars 1.03k forks source link

Parsing of arguments works different for MSbuild and dotnet build commands #40236

Open f-alizada opened 3 months ago

f-alizada commented 3 months ago

Describe the bug

The parsing works differently on MSBuild.exe and dotnet build commands.

To Reproduce

If called msbuild.exe the output of the project:

<Project>
  <Target Name="PrintPropertyValue">
      <Message Text="Property value = ($(propertyValue))" Importance="high" />
  </Target>
</Project>

results:

Property value = (Hello, "World!")

Error

MSBUILD : error MSB1006: Property is not valid. Switch: World!

Further technical details

f-alizada commented 3 months ago

@baronfel For you information :) (discsused offline)