less than 1 minute read

1
2
3
4
5
6
7
8
9
+ dotnet build --no-restore p:DefineConstants=TEST Sample.sln
/usr/share/dotnet-build-tools/sdk/dotnet build --no-restore p:DefineConstants=TEST Sample.sln /nodeReuse:false /p:UseSharedCompilation=false
Microsoft (R) Build Engine version 16.5.0+d4cbfca49 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1008: Only one project can be specified.
Switch: Sample.sln

For switch syntax, type "MSBuild -help"

MSBUILD : error MSB1008: Only one project can be specified.

1
2
3
4
dotnet restore Sample.sln -s /nuget
dotnet build --no-restore Sample.sln 
dotnet clean
dotnet build --no-restore p:DefineConstants="TEST" Sample.sln

https://stackoverflow.com/questions/3779701/msbuild-error-msb1008-only-one-project-can-be-specified https://community.sonarsource.com/t/msbuild-error-msb1008-only-one-project-can-be-specified-switch-sonarscanner-msbuild-exe/26900 https://pythonq.com/so/visual-studio/33655

1
2
3
4
dotnet restore Sample.sln -s /nuget
dotnet build --no-restore Sample.sln 
dotnet clean
dotnet build --no-restore /p:DefineConstants="TEST" Sample.sln

Tags: , ,

Categories:

Source File: 2021-04-28-MSB1008.md

Updated:

Comments