Title: Extending nant

I'm attempting to create a custom NAnt task and I'm running into some issues.  My class compiles fine in VS.NET 2005 (I'm running the latest nightly build of NAnt, built for VS.NET 2005/.NET 2.0), but when I try to run the .build file I get the following exception:

BUILD FAILED

INTERNAL ERROR

System.NullReferenceException: Object reference not set to an instance of an object.
   at CareWorks.NAnt.VSS.CwtLabelWatchTask.ExecuteTask()
   at NAnt.Core.Task.Execute() in d:\Source\nant-20051211T094754Z\src\NAnt.Core\Task.cs:line 171
   at NAnt.Core.Target.Execute() in d:\Source\nant-20051211T094754Z\src\NAnt.Core\Target.cs:line 247
   at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies) in d:\Source\nant-20051211T094754Z\src\NAnt.Core\Project.cs:line 885

   at NAnt.Core.Project.Execute() in d:\Source\nant-20051211T094754Z\src\NAnt.Core\Project.cs:line 837
   at NAnt.Core.Project.Run() in d:\Source\nant-20051211T094754Z\src\NAnt.Core\Project.cs:line 922

When I step through the code with a debugger, it looks like the error is cropping up when the base Task.Execute() method is being run.  Specifically this line:

Project.OnTaskStarted(this, new BuildEventArgs(this));

When I step into this method, the properties target, project, and task are all set to null.

Any help would be greatly appreciated.

Thanks,

Jeremiah Peschka
CONFIDENTIALITY NOTICE:  This is an e-mail transmission and the information is privileged and/or confidential. It is intended only for the use of the individual or entity to which it is addressed. If you have received this communication in error, please notify the sender at the reply e-mail address and delete it from your system without copying or forwarding it. If you are not the intended recipient, you are hereby notified that any retention, distribution, or dissemination of this information is strictly prohibited. Thank you.

Reply via email to