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

陌路散爱 提交于 2019-12-06 21:09:13

问题


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;

I did search on stackoverflow and people having similar issue 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. Any ideas?

Regards

Ismail


回答1:


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;


来源:https://stackoverflow.com/questions/16979137/msbuild-error-msb1008-only-one-project-can-be-specified-in-teamcity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!