MSBUILD 错误,其中文件夹包含多个解决方案文件
我正在尝试设置 CCNET,但遇到了问题。
我的构建失败,并且收到此错误
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
块如下
<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 有多个解决方案文件。即使我指定了项目文件,我仍然收到该错误。
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.
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>
In this case, C:\example\directory has multiple solution files. Even though I specified the project file I'm still getting that error.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该在 sln 组中指定要构建的内容。
因此,在 CC.NET 中,在
标记中添加/t
参数。参考:http://msdn.microsoft.com/en-us/library/ms164311 .aspx
You should specify what to build in the sln group.
So in CC.NET, add the
/t
parameter in the<buildArgs>
tag.Reference : http://msdn.microsoft.com/en-us/library/ms164311.aspx