question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MSBUILD : error MSB1006: Property is not valid. Switch: /m:1

See original GitHub issue

Using 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:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
sfoslundcommented, Dec 1, 2020

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

1reaction
billwertcommented, Dec 1, 2020

@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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found