When using an external entity to contain task
definitions, NAnt 0.8.2 will generate the following stack
trace:
INTERNAL ERROR
System.NullReferenceException: Object reference not
set to an instance of an obj
ect.
at
SourceForge.NAnt.LocationMap.GetXPathFromNode
(XmlNode node)
at SourceForge.NAnt.LocationMap.GetLocation
(XmlNode node)
at SourceForge.NAnt.TaskFactory.CreateTask
(XmlNode taskNode, Project proj)
at
SourceForge.NAnt.Project.InitializeProjectDocument
(XmlDocument doc)
at SourceForge.NAnt.Project.Execute()
at SourceForge.NAnt.Project.Run()
This is due to a flaw in
Project.InitializeProjectDocument which will pass an
EntityReference node to CreateTask which will
eventually fail to create an XPath reference.
Attached file contains a build file that will fail on 0.8.2
and a diff file that will fix the problem. The expected
result of the build file is to display "Hello, World".
Diff file for Core/Project.cs with sample failing build file
Logged In: YES
user_id=707851
Scott, made any progress on this ?
Logged In: YES
user_id=4117
As a first step I have removed the error generated by
entities. The next step is to include the entity, and evaluate
it correctly.
For now, Entities are simply ignored.
Logged In: YES
user_id=4117
As a first step I have removed the error generated by
entities. The next step is to include the entity, and evaluate
it correctly.
For now, Entities are simply ignored.
Logged In: YES
user_id=27193
The attachment had a fix and tests that fixed the whole problem. I don't
know how much the underlying code changed, but I would think it would
be simplier just to review the patch than to work through the problem
piecemeal.
Logged In: YES
user_id=707851
Scott,
Can you have another look at this ?
Thanks !!