MSBUILD:错误MSB1008:在teamcity中只能指定一个项目 [英] MSBUILD : error MSB1008: Only one project can be specified in teamcity

查看:443
本文介绍了MSBUILD:错误MSB1008:在teamcity中只能指定一个项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用TeamCity运行MSBuild.

I am trying to run MSBuild with TeamCity.

我有一个批处理文件,我将参数传递给它,并且构建工作正常.当我尝试运行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"

在TeamCity中,我的命令行参数字段如下所示 Configuration=Debug;DeployPath=E:\websites\umbraco\mysite;Environment=Dev;

In TeamCity my command line parameters field looks like Configuration=Debug;DeployPath=E:\websites\umbraco\mysite;Environment=Dev;

我确实在StackOverflow上进行搜索,遇到类似问题的人提到要确保命令行参数中没有空格,而且我的sln和proj文件/页面也没有空格.

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.

正如我说的那样,当我使用这些参数运行批处理文件时,所有文件都可以使用,但是TeamCity失败.

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

推荐答案

我设法在命令行中重现该错误:显然,Default.msbuild.teamcity.msbuild.tcargs的文件内容必须为:

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;

代替:

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

这篇关于MSBUILD:错误MSB1008:在teamcity中只能指定一个项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆