Bugs item #875664, was opened at 2004-01-12 21:54
Message generated for change (Comment added) made by drieseng
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=875664&group_id=31650

Category: Tasks
Group: 0.8.4.0
Status: Open
Resolution: None
Priority: 5
Submitted By: Phil Wells (pw9272)
Assigned to: Nobody/Anonymous (nobody)
Summary: solution task throws NullReferenceException

Initial Comment:
I have a solution file with multiple VB.NET projects which 
compiles fine using the <solution> task using NAnt 
nightly build 20031016 (although the executable it 
generates still throws a serious Windows error - see my 
earlier bug report). 

However under NAnt 0.8.4 (and also nightly build 
20040104) the solution will not compile at all. It reports 
an INTERNAL ERROR as follows:


Compile:

 [solution] Starting solution build.
 [solution] Loading projects...
 [solution] Loading 
project 'c:\deploymentcentre\build\40112165035
\projects\opsscheduler2003
\..\OPSValidationService\ValidationServiceInterfaces\Vali
dationServiceInterfaces.vbproj'.

BUILD FAILED

INTERNAL ERROR

System.NullReferenceException: Object reference not 
set to an instance of an object.
   at NAnt.VSNet.Reference..ctor(Solution solution, 
ProjectSettings ps, XmlElement elemReference, 
SolutionTask solutionTask, String outputDir)
   at NAnt.VSNet.Project.Load(Solution sln, String 
projectPath)
   at NAnt.VSNet.ProjectFactory.LoadProject(Solution 
sln, SolutionTask slnTask,TempFileCollection tfc, String 
outputDir, String path)
   at NAnt.VSNet.Solution.LoadProjects()
   at NAnt.VSNet.Solution..ctor(String solutionFileName, 
ArrayList additionalProjects, ArrayList referenceProjects, 
TempFileCollection tfc, SolutionTask solutionTask, 
WebMapCollection webMappings, FileSet 
excludesProjects, String outputDir)

   at NAnt.VSNet.Tasks.SolutionTask.ExecuteTask()
   at NAnt.Core.Task.Execute()
   at NAnt.Core.Target.Execute()
   at NAnt.Core.Project.Execute(String targetName, 
Boolean forceDependencies)
   at NAnt.Core.Project.Execute()
   at NAnt.Core.Project.Run()


----------------------------------------------------------------------

>Comment By: Gert Driesen (drieseng)
Date: 2004-01-27 19:13

Message:
Logged In: YES 
user_id=707851

Can you package up a zip file containing the minimum set of 
files necessary to reproduce this issue and attach it to this 
bug report ?

Thanks for the report !

----------------------------------------------------------------------

Comment By: mark watts (mwatts)
Date: 2004-01-13 20:10

Message:
Logged In: YES 
user_id=51461

I have also gotten this problem.  I rebuilt the source and 
have been able to reproduce the problem with line numbers. 
See stack dump below.

In looking at the detail the exception is happening because 
the code assumes in Reference.cs:line 153 that the 
Reference element has a "HintPath" attribute.  My project 
does not.  It has "Name", "Project" and "Package" attributes, 
where 
  Name is the name of the project that is being referenced
  Project is the GUID of the project that is being referenced
  Package is the GUID that appears in the 
   Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}")
  section of the main solution file.

Given this however, I am not clear enough on what the fix 
should be.



     [call] System.NullReferenceException: Object reference 
not set to an instance of an object.
   at NAnt.VSNet.Reference..ctor(Solution solution, 
ProjectSettings ps, XmlElement elemReference, SolutionTask 
solutionTask, String outputDir) in 
C:\DevTools\NAnt\src\NAnt.VSNet\Reference.cs:line 153
   at NAnt.VSNet.Project.Load(Solution sln, String 
projectPath) in 
c:\devtools\nant\src\nant.vsnet\project.cs:line 194
   at NAnt.VSNet.ProjectFactory.LoadProject(Solution sln, 
SolutionTask slnTask, TempFileCollection tfc, String 
outputDir, String path) in 
C:\DevTools\NAnt\src\NAnt.VSNet\ProjectFactory.cs:line 70
   at NAnt.VSNet.Solution.LoadProjects() in 
C:\DevTools\NAnt\src\NAnt.VSNet\Solution.cs:line 407
   at NAnt.VSNet.Solution..ctor(String solutionFileName, 
ArrayList additionalProjects, ArrayList referenceProjects, 
TempFileCollection tfc, SolutionTask solutionTask, 
WebMapCollection webMappings, FileSet excludesProjects, 
String outputDir) in 
C:\DevTools\NAnt\src\NAnt.VSNet\Solution.cs:line 114
   at NAnt.VSNet.Tasks.SolutionTask.ExecuteTask() in 
C:\DevTools\NAnt\src\NAnt.VSNet\Tasks\SolutionTask.cs:line 
317
   at NAnt.Core.Task.Execute() in 
C:\DevTools\NAnt\src\NAnt.Core\Task.cs:line 151
   at NAnt.Core.Target.Execute() in 
C:\DevTools\NAnt\src\NAnt.Core\Target.cs:line 217
   at NAnt.Core.Project.Execute(String targetName, Boolean 
forceDependencies) in 
c:\devtools\nant\src\nant.core\project.cs:line 772
   at NAnt.Core.Project.Execute(String targetName) in 
c:\devtools\nant\src\nant.core\project.cs:line 747
   at NAnt.Core.Tasks.CallTask.ExecuteTask() in 
C:\DevTools\NAnt\src\NAnt.Core\Tasks\CallTask.cs:line 110
   at NAnt.Core.Task.Execute() in 
C:\DevTools\NAnt\src\NAnt.Core\Task.cs:line 143




----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=875664&group_id=31650


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to