Bugs item #1288969, was opened at 2005-09-12 13:14
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1288969&group_id=31650
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nils Benson (nbenson)
Assigned to: Nobody/Anonymous (nobody)
Summary: Build fails when BuildAction for a file is invalid/missing
Initial Comment:
The problem lies here:
nant 0.85.rc3
ManagedProjectBase.cs : 93
The BuildAction attribute of the XML node is referenced
without first checking to see if it actually exists in the
document. This causes the build to dir horribly with a
mysterious "null reference exception".
The .csproj files that caused this were all generated by
VS.Net, so this param probably needs to be checked
before use. I would suggest just defaulting to "Compile"
and displaying a strong warning. I have made this
particular change to my source tree and it seems to
work fine:
if( null !=
elemFile.Attributes[ "BuildAction" ] )
{
buildAction = elemFile.Attributes
[ "BuildAction" ].Value;
}
else
{
Log( Level.Error, string.Format( "Invalid or
empty BuildAction for file: {0}", elemFile.Attributes
[ "RelPath" ] ) );
}
This happens to many (> 25%) of our projects, and we
only use VS.NET 2003 and never hand-modify (or
merge) project files.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1288969&group_id=31650
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
nant-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-developers