问题
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.
回答1:
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
来源:https://stackoverflow.com/questions/7530203/msbuild-error-where-folder-contains-more-than-one-solution-file