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

1

9

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.

Virago answered 7/6, 2013 at 8:4 Comment(1)
Can you please post the contents of that batch file.Also , did you find a solution for your postStandup
G
12

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;
Gorham answered 7/6, 2013 at 21:33 Comment(4)
Pedro, many thanks for you reply all sorted I had to take of the last semi colon. I have been struggling with for days.Virago
I haven't found this as a file, but I just changed the command line arguments in MsBuild build step, and it worked...Pastiche
@Pedro Pombeiro: I tried MSBuild.exe C:\BuildAgent\work\4c7b8ac8bc7d723e\WebService.sln /p:Configuration=Release /p:OutputPath=bin /p:DeployOnBuild=True /p:DeployTarget=MSDeployPublish /p:MsDeployServiceUrl=https://204.158.674.5/msdeploy.axd /p:username=Admin /p:password=Password#321 /p:AllowUntrustedCertificate=True /p:DeployIisAppPath=Default WebSite/New /p:MSDeployPublishMethod=WMSVC. It gives me an error MSBUILD : error MSB1008: Only one project can be specified. Switch: WebSite/New. What might be the issue?Standup
@NevinRaj: Can you try adding commas around the parameter value? (i.e. /p:DeployIisAppPath="Default WebSite/New")Gorham

© 2022 - 2024 — McMap. All rights reserved.