Question

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.

Was it helpful?

Solution

You should specify what to build in the sln group.

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

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

Reference : http://msdn.microsoft.com/en-us/library/ms164311.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top