NAnt.Core.Project

"Obendorf, Keston" <[email protected]> Fri, 24 Jun 2011 15:25:34 -0700
Newsgroups gmane.comp.windows.dotnet.nant.user
Message-ID <43F901BD926A4E43B106BF17856F07550190F5D290@orsmsx508.amr.corp.intel.com>
I'm trying to make a custom Nant task that may end up calling another Nant build file.

I create the project like so:
NAnt.Core.Project buildProject = new NAnt.Core.Project(BuildfilePath, NAnt.Core.Level.Info, 1);
buildProject.Execute(BuildfileTarget);


This will not execute the target, giving the error log message that the target was not found.

            foreach (string s in buildProject.BuildTargets)
            {
                this.Project.Log(NAnt.Core.Level.Info, "BuildTarget: " + s);
            }
            foreach (NAnt.Core.Target t in buildProject.Targets)
            {
                this.Project.Log(NAnt.Core.Level.Info, "Target: " + t.Name);
            }

Yields no results for either property.

I don't see a bug in for this, nor any documentation so I don't know if this is expected behavior.

Does anyone have experience using the Project object?

_Keston

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a 
definitive record of customers, application performance, security 
threats, fraudulent activity and more. Splunk takes this data and makes 
sense of it. Business sense. IT sense. Common sense.. 
http://p.sf.net/sfu/splunk-d2d-c1

_______________________________________________
NAnt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-users