-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dotnet build
and friends mangle invalid property specifications
#37230
Comments
Something in CLI argument parsing is seeing
and substituting in
which exposes the user to dotnet/msbuild#9475. |
It's probably a bug in our version of the property parser here. |
@ShreyasJejurkar, that's successfully reproducing the error. You should have seen error text because /p:UseRidGraph:false is incorrect syntax, but you didn't. That's the bug. |
dotnet build
mangles invalid property specificationsdotnet build
and friends mangle invalid property specifications
Making this a bit more broad because of #38645, which likely is the same issue but for |
Originally filed as dotnet/msbuild#9475 by @Forgind. There is a bug in MSBuild but it's exacerbated by a CLI behavior.
Issue Description
Specifying /p:Property:value instead of /p:Property=value leads to an aborted build when using dotnet build.
Steps to Reproduce
Expected Behavior
One line for the MSBuild version followed by a line specifying that the property is not valid (MSB1006) then telling me which exactly was wrong like:
MSBuild version 17.9.0-dev-23579-01+5fcddc790 for .NET Framework
MSBUILD : error MSB1006: Property is not valid.
Switch: UseRidGraph:false
For switch syntax, type "MSBuild -help"
Actual Behavior
It just told me the version with no errors:
MSBuild version 17.8.3+195e7f5a3 for .NET
Analysis
I tried this with MSBuild.exe (from main, not 17.8.3), and it worked as expected. I tried dotnet MSBuild.dll with the MSBuild freshly built from main, and it worked as expected. I tried using MSBuild.exe from my VS preview (version 17.9.0-preview-23574-01+7b37a280a), and this bug still didn't reproduce. Then I built MSBuild main and used the deploy script to overwrite my 8.0.100 SDK, and this bug finally reproduced.
That means this may be Core-specific (a CLI bug?) or it may be specific to some component that MSBuild does not overwrite with the deploy script. Of note, it does still print out the version, which (I think) means MSBuild knows it's supposed to be executing and tries to execute but ultimately fails without logging anything further.
Versions & Configurations
8.0.100 SDK with MSBuild version above.
The text was updated successfully, but these errors were encountered: