Hi Daniel,

Thanks for the quick response.  You are correct in your understanding;
I am trying to use the <nant> task in CCnet.config to call my existing
NAnt build scripts, which contain MSBuild tasks.  If I simply specify
the task in CCNet config as follows, I get the first error in my
original post where MSBuild is saying it cannot load the ThoughtWorks
logger.

    <tasks>
      <!-- http://confluence.public.thoughtworks.org/display/CCNET/NAnt+Task
-->
      <nant>
        <executable>D:\BUILD_UTILITIES\NAnt\bin\NAnt.exe</executable>
        <baseDirectory>D:\BUILD_SCRIPTS\trunk\BuildScripts</
baseDirectory>
        <buildFile>GLOBAL_BUILD_EVERYTHING.build</buildFile>
        <targetList>
          <target>build-source</target>
        </targetList>
        <buildTimeoutSeconds>1000</buildTimeoutSeconds>
      </nant>
    </tasks>

Really I could care less how pretty the MSBuild XSL looks, for now I'm
just trying to get it to build! :-)

I am using NAnt 0.86.2898.0 (beta 1) and CCNet 1.4.2.14, forgot to
mention that the first time.


On Feb 12, 12:54 pm, Daniel Hommel <[email protected]> wrote:
> 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