MSBUILD错误,其中文件夹包含多个解决方案文件 [英] MSBUILD error where folder contains more than one solution file

查看:91
本文介绍了MSBUILD错误,其中文件夹包含多个解决方案文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置CCNET,但遇到了问题.

I'm trying to set up CCNET and I've run into a problem.

我的构建失败,并且出现此错误

My builds are failing and I'm getting this error

MSBUILD : error MSB1011: Specify which project or solution file to use because this folder contains more than one project or solution file.

在我的配置文件 ccnet.config 中,我的 msbuild 块如下

In my configuration file ccnet.config my msbuild block is as follows

  <msbuild>
  <executable>C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
   <workingDirectory>C:\example\directory</workingDirectory>
  <projectFile>ExampleSolution.sln</projectFile>
  <buildArgs>/noconsolelogger /v:quiet
   /p:Configuration=Debug
   /p:ReferencePath="C:\Program Files (x86)\NUnit 2.5.10\bin\net-2.0\"
  </buildArgs>
  <targets>ReBuild</targets>
  <timeout>600</timeout>
  </msbuild>

在这种情况下,C:\ example \ directory具有多个解决方案文件.即使我指定了项目文件,我仍然遇到该错误.

In this case, C:\example\directory has multiple solution files. Even though I specified the project file I'm still getting that error.

推荐答案

您应在sln组中指定要构建的内容.

You should specify what to build in the sln group.

msbuild SlnFolders.sln /t:NotInSolutionfolder:Rebuild;NewFolder\InSolutionFolder:Clean

因此,在CC.NET中,将/t 参数添加到< buildArgs> 标记中.

So in CC.NET, add the /t parameter in the <buildArgs> tag.

参考文献: http://msdn.microsoft.com/zh-cn/library/ms164311.aspx

这篇关于MSBUILD错误,其中文件夹包含多个解决方案文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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