msbuildteamcitymsbuild-4.0teamcity-7.1

MSBUILD : error MSB1008: Only one project can be specified in teamcity


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 the 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 TeamCity my command line parameters field looks like Configuration=Debug;DeployPath=E:\websites\umbraco\mysite;Environment=Dev;

I did search on StackOverflow and people having similar issues mention ensuring no spaces in commandline parameters also my sln and proj files / pages do not have spaces.

As I said when I run a batch file with those parameters it all works, however, TeamCity fails.


Solution

  • I managed to reproduce the error in the command line: apparently the file contents for Default.msbuild.teamcity.msbuild.tcargs need to be:

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

    instead of:

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