Getting MSBuild log executed from NAnt into CruiseControl

40 views
Skip to first unread message

Rainey, Mark (Cleveland)

unread,
Dec 5, 2006, 4:23:38 PM12/5/06
to ccnet...@googlegroups.com
My NAnt script executes the MSBuild.exe to build a solution. How do I
generate an xml log file this way to merge into CruiseControl? I can
get the CCNet MSBuild task to work but would prefer to execute it from
NAnt. This is my NAnt block:

<exec program="MSBuild.exe" basedir="${net2.0.framework.path}"
workingdir="${solution.path}" verbose="true" if="${msbuild.flag}">
<arg value="/noconsolelogger" />
<arg value="/property:Configuration=${configuration}" />
<arg
value="/logger:ThoughtWorks.CruiseControl.MsBuild.XmlLogger,${workspace.
base}\Global\Build\ThoughtWorks.CruiseControl.MsBuild.dll" />
</exec>

Thank you,

Mark

Andy Johnstone

unread,
Dec 5, 2006, 4:36:31 PM12/5/06
to ccnet...@googlegroups.com
I just use this, and it seems to incorporate Msbuild output automatically..

<exec basedir="C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727"
program="msbuild.exe">
<arg value="/nologo" />
<arg value="${LocalSolutionRoot}\${SolutionName}.sln" />
<arg value="/p:OutputPath=${LocalSolutionBin}" />
<arg value="/p:SignAssembly=true" />
<arg
value="/p:AssemblyOriginatorkeyFile=${LocalShared}\OurKey.snk" />
<arg value="/p:Configuration=Release" />
<arg value="/p:ReferencePath=&quot;${ReferencePaths}&quot;" />
</exec>
</target>

Rainey, Mark (Cleveland)

unread,
Dec 5, 2006, 5:17:38 PM12/5/06
to ccnet...@googlegroups.com
I have it working now.

To clarify I would like the output the same as the CCNet MSBuild Task in
the Dashboard.

I added ;${CCNetWorkingDirectory}\msbuild-results.xml to


<arg
value="/logger:ThoughtWorks.CruiseControl.MsBuild.XmlLogger,${workspace.

base}\Global\Build\ThoughtWorks.CruiseControl.MsBuild.dll;;${CCNetWorkin
gDirectory}\msbuild-results.xml" />

In my ccnet.config file I make sure to merge this xml file.


Mark Rainey
216.825.6641

Gary Feldman

unread,
Dec 6, 2006, 2:41:39 PM12/6/06
to ccnet...@googlegroups.com
Andy Johnstone wrote:
> I just use this, and it seems to incorporate Msbuild output automatically..
>
> <exec basedir="C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727"
> program="msbuild.exe">
> <arg value="/nologo" />
> <arg value="${LocalSolutionRoot}\${SolutionName}.sln" />
> <arg value="/p:OutputPath=${LocalSolutionBin}" />
> <arg value="/p:SignAssembly=true" />
> <arg
> value="/p:AssemblyOriginatorkeyFile=${LocalShared}\OurKey.snk" />
> <arg value="/p:Configuration=Release" />
> <arg value="/p:ReferencePath=&quot;${ReferencePaths}&quot;" />
> </exec>
> </target>
>
This won't produce the XML output log that CC.Net knows how to format.
The approach Mark found in answer to his own question is the preferred
approach.

Gary

Reply all
Reply to author
Forward
0 new messages