Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
MSBUILD错误,其中文件夹包含多个解决方案文件_Msbuild_Ccnet Config - Fatal编程技术网

MSBUILD错误,其中文件夹包含多个解决方案文件

MSBUILD错误,其中文件夹包含多个解决方案文件,msbuild,ccnet-config,Msbuild,Ccnet Config,我正试图建立CCNET,但遇到了一个问题 我的构建失败了,我遇到了这个错误 MSBUILD : error MSB1011: Specify which project or solution file to use because this folder contains more than one project or solution file. 在我的配置文件中,ccnet.configmymsbuild块如下 <msbuild> <executable>

我正试图建立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
my
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:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
C:\example\directory
ExampleSolution.sln
/noconsolelogger/v:安静
/p:配置=调试
/p:ReferencePath=“C:\ProgramFiles(x86)\NUnit 2.5.10\bin\net-2.0”
重建
600

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

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

msbuild SlnFolders.sln /t:NotInSolutionfolder:Rebuild;NewFolder\InSolutionFolder:Clean
因此,在CC.NET中,在
标记中添加
/t
参数


参考资料:

什么版本的巡航控制?还有一个愚蠢的问题,但您没有多个msbuild任务,是吗(您可能看到的是错误的任务…)?版本1.6.7981.1。没有,我只有一个msbuild任务。最后我不得不在后面添加ExampleSolution.sln,并从引用路径中取出最后一个“\”