MSBUILD : error MSB1008: Only one project can be specified


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


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



1 comment
Comment actions Permalink

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:




This seems to have solved the issue.


Please sign in to leave a comment.