Bugs item #1288969, was opened at 2005-09-12 20:14
Message generated for change (Comment added) made by drieseng
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: Tasks
>Group: 0.85
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Nils Benson (nbenson)
>Assigned to: Gert Driesen (drieseng)
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.
----------------------------------------------------------------------
>Comment By: Gert Driesen (drieseng)
Date: 2005-10-08 09:28
Message:
Logged In: YES
user_id=707851
This is now fixed in cvs. We do not output a warning yet. Not
sure if we should do this if VS.NET frequently messes up
project files like this.
Thanks for the report !
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1288969&group_id=31650
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
nant-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-developers