MSBUILD : error MSB1008: Only one project can be specified

Hello,

I am trying to run msbuild with teamcity. I have a batch file and I pass into it parameters and the build works. When I try to run through teamcity I get error below

[13:24:46][MSBuild output] Start MSBuild...
[13:24:46][MSBuild output] 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe' '"@C:\TeamCity\buildAgent\work\999585556854a516\Build\Default.msbuild.teamcity.msbuild.tcargs" C:\TeamCity\buildAgent\work\999585556854a516\Build\Default.msbuild.teamcity'
[13:24:46][MSBuild output] working dir = 'C:\TeamCity\buildAgent\work\999585556854a516'
[13:24:46][MSBuild output] Microsoft (R) Build Engine Version 4.0.30319.1
[13:24:46][MSBuild output] [Microsoft .NET Framework, Version 4.0.30319.296]
[13:24:46][MSBuild output] Copyright (C) Microsoft Corporation 2007. All rights reserved.
[13:24:46][MSBuild output]
[13:24:46][MSBuild output] MSBUILD : error MSB1008: Only one project can be specified.
[13:24:46][MSBuild output] Switch: C:\TeamCity\buildAgent\work\999585556854a516\Build\Default.msbuild.teamcity
[13:24:46][MSBuild output]
[13:24:46][MSBuild output] For switch syntax, type "MSBuild /help"


In team city my command line parameters field looks like

Configuration=Debug;DeployPath=E:\websites\umbraco\mysite;Environment=Dev;


As I said when I run a batch file with those parameters it all works.  Any ideas?

Regards

Ismail

0
3 comments
Avatar
Permanently deleted user

I had the exact same error on TeamCity 8.0.5, using the MSBuild ToolsVersion 4.0, MSBuild Version .NET 4.5.

The solution was a change in command line parameters in the MsBuild build step.

I changed it from:

Configuration=Release

To:

/p:Configuration=Release

This seems to have solved the issue.

0

Seeing the same error, with: TeamCity 2021.2 (build 99542)

[14:17:02][Step 2/7] dotnet msbuild
[14:17:02][dotnet msbuild] Starting: .NET SDK 5.0.400 "C:\Program Files\dotnet\dotnet.exe" msbuild "C:\Program Files\TeamCity\buildAgent\work\a54d03ffb9c57279\Solution1.sln" /p:Configuration=Release /v:diagnostic "@C:\Program Files\TeamCity\buildAgent\temp\agentTmp\1.rsp"
[14:17:02][dotnet msbuild] in directory: C:\Program Files\TeamCity\buildAgent\work\a54d03ffb9c57279
[14:17:02][dotnet msbuild] Microsoft (R) Build Engine version 16.11.0+0538acc04 for .NET
[14:17:02][dotnet msbuild] Copyright (C) Microsoft Corporation. All rights reserved.
[14:17:02][dotnet msbuild]
[14:17:02][dotnet msbuild] MSBUILD : error MSB1008: Only one project can be specified.
[14:17:02][dotnet msbuild] Switch: Files\TeamCity\buildAgent\plugins\dotnet\tools\msbuild15\TeamCity.MSBuild.Logger.dll;TeamCity;verbosity=diagnostic;plain
[14:17:02][dotnet msbuild]
[14:17:02][dotnet msbuild] For switch syntax, type "MSBuild -help"
[14:17:02][dotnet msbuild] Process exited with code 1
[14:17:02][dotnet msbuild] Process exited with code 1 (Step: Build .NET Solution (.NET))
[14:17:02][Step 2/7] Step Build .NET Solution (.NET) failed
0

Shyam Gonella the 2021.2 post-upgrade issue looks like the TW-73745 regression. Here are the workarounds.

Apologies for the inconvenience.

0

Please sign in to leave a comment.