MSBUILD : error MSB1006: Property is not valid. Switch: /m:1
See original GitHub issueUsing a .NET 6 SDK I installed this morning (6.0.100-alpha.1.20574.4):
dotnet new console
dotnet restore /p:DebugType=portable /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1 /p:Deterministic=true /p:Optimize=true
results in:
MSBUILD : error MSB1006: Property is not valid.
Switch: /m:1
For switch syntax, type "MSBuild -help"
If the /m:1
is moved to the beginning of the options:
dotnet new console
dotnet restore /m:1 /p:DebugType=portable /p:UseSharedCompilation=false /p:BuildInParallel=false /p:Deterministic=true /p:Optimize=true
then it succeeds.
This is breaking benchmark.net.
cc: @adamsitnik
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:10 (10 by maintainers)
Top Results From Across the Web
error MSB1006: Property is not valid." : TW-76527 - YouTrack
Running a .NET builder task on DotNet 6 SDK solution generates a build error "MSBUILD : error MSB1006: Property is not valid.".
Read more >Property is not valid error caused by auto removal ...
When running an MSBuild task, bamboo removes the quotes around the property value which cause the build to fail. As mentioned in a...
Read more >Receive MSB1006 whenever running dotnet ef migrations
MSBUILD : error MSB1006: Property is not valid. Switch: \tmpBCE7.tmp For switch syntax, type "MSBuild /help" Unable to retrieve project metadata ...
Read more >MSB6001: Invalid command line switch for 'tool'. - MSBuild
This error indicates that an executable that was part of the build process could not be executed. There is usually an additional error...
Read more >dotnet publish switch error
Results in error: MSBUILD : error MSB1001: Unknown switch. Full command line: '/usr/share/dotnet/sdk/6.0.408/MSBuild.
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
Actually it looks like we haven’t had a SDK-> installer insertion since Tuesday. This PR should fix that, I’ll try to get it unstuck: https://github.com/dotnet/installer/pull/9172
@sfoslund I’m still seeing this error in version
6.0.100-alpha.1.20574.5
from dotnet/installer. Here is a helix log from this afternoon. Presumably this fix should have flowed into installer by now?