Hi Nathan,

if i understand you correctly you are trying to use the NAnt task of
CruiseControl.NET to call the MSBuild task of NAnt. I think the problem
is that you are trying to specify a logger for MSBuild through the
logger element of the NAnt task. That way CruiseControl.NET tries to
make NAnt use the MSBuild logger and fails. If you want to use NAnt to
call MSBuild you need to specify the logger in the NAnt build script.

As far as i can see the NAnt MSbuild task has no setting to specify a
logger. If you really need to specify one you could use the exec task.
But if i remember correctly the MSBuild output will go into the NAnt
log and therefore i wonder if you need to use a logger at all. I guess
you want to use the MSBuild XSL because it looks better? Then you need
the logger somehow...

regards,

Daniel


On Thu, 12 Feb 2009 12:26:33 -0800 (PST)
Nathaniel <[email protected]> wrote:

> 
> I have an existing set of NAnt build scripts that runs with zero
> dependency on CCNet, and I want to keep that functionality.  I would
> like have CCNet run them, ideally without requiring any changes to the
> existing build scripts.  To that end, I have created a NAnt task
> within my CCNet.config, and when the NAnt script gets to a MSBuild it
> fails:
> 
> Cannot create an instance of the logger. Could not load file or
> assembly 'ThoughtWorks.CruiseControl.MsBuild.XmlLogger' or one of its
> dependencies. The system cannot find the file specified.
> 
> This is with no alternate <logger></logger> in the NAnt task.  I have
> tried a few ways of loading an alternative logger to no avail.
> 
> This: <logger>"C:\Program Files (x86)\CruiseControl.NET\server
> \ThoughtWorks.CruiseControl.MSBuild.dll"</logger>
> 
> Produces this error: Could not load type C:\Program Files
> (x86)\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MSBuild.dll
> 
> If I take the quotes out it gives the same error for "C:\Program".
> 
> This:
>         <buildArgs>-ext:"C:\Program Files (x86)\CruiseControl.NET
> \server\ThoughtWorks.CruiseControl.MSBuild.dll"</buildArgs>
>         <logger>ThoughtWorks.CruiseControl.MSBuild.XmlLogger</logger>
> 
> Produces this error: ThoughtWorks.CruiseControl.MSBuild.XmlLogger does
> not implement NAnt.Core.IBuildLogger.
> (Which is true, it implements ILogger.)
> 
> I have also tried Christian Rodemeyer's logger, and when specified in
> the same fashion as the above example it throws the same error
> (doesn't implement IBuildLogger).
> 
> I am running out of ideas.  If anyone knows how to get this to behave
> without changing the task to an MSBuild task, please let me know!
> 
> Thank you,
> # Nathan

Reply via email to