CruiseControl.net, msbuild, /p:OutputPath and CCNetArtifactDirectory *

Question

I'm trying to setup CruiseControl.net at the moment. So far it works nice, but I have a Problem with the MSBuild Task.

According to the Documentation, it passes CCNetArtifactDirectory to MSBuild. But how do I use it?

I tried this:

<buildArgs>
   /noconsolelogger /p:OutputPath=$(CCNetArtifactDirectory)\test
</buildArgs>

But that does not work. In fact, it kills the service with this error:

ThoughtWorks.CruiseControl.Core.Config.Preprocessor.EvaluationException: Reference to unknown symbol CCNetArtifactDirectory

Documentation is rather sparse, and google und mainly offers modifying the .sln Project file, which is what I want to avoid in order to be able to manually build this project later - I would really prefer /p:OutputPath.

Answer

The CCNetArtifactDirectory is passed to the MSBuild by default, so you dont need to worry about it. MSBuild will place the build output in the "bin location" relevant to the working directory that you have specified.

<executable>c:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
<workingDirectory>C:\data\projects\FooSolution\</workingDirectory>
<projectFile>FooSolution.sln</projectFile>
<buildArgs>/noconsolelogger /p:Configuration=Debug </buildArgs>

So in the above example your build output will be put in C:\data\projects\FooSolution[ProjectName]\bin\Debug. Should you want to output to a different location you may want to look at of the tag in CCNET.

<publishers>
  <xmllogger />
  <buildpublisher>
    <sourceDir>C:\data\projects\FooSolution\FooProject\bin\Debug</sourceDir>
    <publishDir>C:\published\FooSolution\</publishDir>
    <useLabelSubDirectory>false</useLabelSubDirectory>
  </buildpublisher>
</publishers>

This will allow you to publish your output to a different location.

< br > via < a class="StackLink" href=" http://stackoverflow.com/questions/835/" >CruiseControl.net, msbuild, /p:OutputPath and CCNetArtifactDirectory< /a>
Share on Google Plus

About Cinema Guy

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment