user62958
user62958

Reputation: 4929

msbuild and cruiscontrol.net

I am trying to call a batch file insdie cruisecontrol and all the batch file does it calls msbuild on a .sln C# project. I can't get this to work and I get the following error :
'msBuild' is not recognized as an internal or external command Any ideas??

Thanks

Upvotes: 0

Views: 1946

Answers (4)

Brandon Joyce
Brandon Joyce

Reputation: 3110

If it helps, here is an example of one of my msbuild tasks...

<tasks>
  <msbuild>
    <executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
    <workingDirectory>D:\INETPUB\wwwroot\CruiseControl\Utilities\</workingDirectory>
    <projectFile>Utilities.csproj</projectFile>
    <timeout>900</timeout>
    <logger>C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
  </msbuild>
  <artifactcleanup   cleanUpMethod="KeepLastXBuilds"   cleanUpValue="5" />
</tasks>

This should be nested under your project node. Brandon Joyce

Upvotes: 1

Frederik Gheysels
Frederik Gheysels

Reputation: 56974

You will have to put specify the full path to msbuild:

C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe

Upvotes: 3

David
David

Reputation: 34573

It sounds like "msbuild" isn't in your search path. Either update the "path" environment variable or specify the full path to the msbuild.exe file.

Upvotes: 1

rifferte
rifferte

Reputation: 1412

Why call a batch file when you have the MSBuild task?

http://confluence.public.thoughtworks.org/display/CCNET/MsBuild+Task

Also - you may want to make sure the batch file works outside of CruiseControl.Net.

Upvotes: 4

Related Questions