Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cruise Control .NET 4.0 MSBUILD Logger

Has anyone gotten a MSBuild task in Cruise Control to load a logger?

I've tried variations but it always fails to load the logger.

C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe C:\Windows\Microsoft.NET\Framework\v4.0.30319 C:\builds\MVC2Test\trunk\MVC2Test\MVC2Test.sln /noconsolelogger /p:Configuration=CruiseControl /v:diag Build 15 ThoughtWorks.CruiseControl.MsBuild.XmlLogger, C:\Program Files (x86)\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll

Please post a working exclusively .NET 4.0 example if possible.

Thanks

like image 851
AUSTX_RJL Avatar asked Apr 22 '10 13:04

AUSTX_RJL


1 Answers

For me, getting .NET 4.0 and Cruise Control .NET going came down to this:

1) Avoid 64 bit MSBuild like the plague... have a working 32 bit build first.

2) Just specify the fully qualified path to the logger, not the typical class, assembly format.

3) Deploy the targeting pack from the VS 2010 disc. \WCU\MTPack\NetFx_DTP.msi EXTUI=1 /log install.log

4) Always prove MSBuild works from the command line first.

5) Create a configuration in your solution file and include only the projects you want to build

<msbuild>
    <!-- WARNING:  You must copy the files from C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications to the same path on your build server -->
    <executable>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
    <workingDirectory>C:\builds\SOLUTIONFOLDER\trunk\</workingDirectory>
    <projectFile>C:\builds\SOLUTIONFOLDER\trunk\SOLUTIONNAME.sln</projectFile>
    <buildArgs>/noconsolelogger /p:Configuration=CruiseControl /v:diag</buildArgs>
    <targets>Build</targets>
    <timeout>15</timeout>
    <logger>C:\CruiseControl\server\ThoughtWorks.CruiseControl.MSBuild.dll</logger>
</msbuild>

Now if Microsoft would only let us easily install MSTest on our Build Servers... People have been begging for 5 years, how can Microsoft have learned so little about testing?

Good luck all.

like image 144
AUSTX_RJL Avatar answered Oct 21 '22 20:10

AUSTX_RJL