I recently upgraded our project to .NET 2.0.  After adding a ProjectGuid
to our csproj file (as instructed by a previous nant build error), I
receive the following error:  (I have included the contents of our build
file below, as well)

I have downloaded the latest nightly build of NANT.

System.NullReferenceException: Object reference not set to an instance
of an object.
   at NAnt.VSNet.ProjectFactory.IsUrl(String fileName) in
e:\cvs\nant\src\NAnt.VSNet\ProjectFactory.cs:line 103
   at NAnt.VSNet.ManagedProjectBase.get_ProjectPath() in
e:\cvs\nant\src\NAnt.VSNet\ManagedProjectBase.cs:line 222
   at NAnt.VSNet.CSharpProject.VerifyProjectXml(XmlElement docElement)
in e:\cvs\nant\src\NAnt.VSNet\CSharpProject.cs:line 65
   at NAnt.VSNet.ProjectBase..ctor(XmlElement xmlDefinition,
SolutionTask solutionTask, TempFileCollection temporaryFiles, GacCac
e gacCache, ReferencesResolver referencesResolver, DirectoryInfo
outputDir) in e:\cvs\nant\src\NAnt.VSNet\ProjectBase.cs:line 72
   at NAnt.VSNet.ManagedProjectBase..ctor(SolutionBase solution, String
projectPath, XmlElement xmlDefinition, SolutionTask solut
onTask, TempFileCollection tfc, GacCache gacCache, ReferencesResolver
refResolver, DirectoryInfo outputDir) in e:\cvs\nant\src\NA
t.VSNet\ManagedProjectBase.cs:line 42
   at NAnt.VSNet.CSharpProject..ctor(SolutionBase solution, String
projectPath, XmlElement xmlDefinition, SolutionTask solutionTa
k, TempFileCollection tfc, GacCache gacCache, ReferencesResolver
refResolver, DirectoryInfo outputDir) in e:\cvs\nant\src\NAnt.VS
et\CSharpProject.cs:line 36
   at NAnt.VSNet.ProjectFactory.CreateProject(SolutionBase solution,
SolutionTask solutionTask, TempFileCollection tfc, GacCache
acCache, ReferencesResolver referencesResolver, DirectoryInfo outputDir,
String projectPath) in e:\cvs\nant\src\NAnt.VSNet\Projec
Factory.cs:line 179
   at NAnt.VSNet.ProjectFactory.LoadProject(SolutionBase solution,
SolutionTask solutionTask, TempFileCollection tfc, GacCache ga
Cache, ReferencesResolver referencesResolver, DirectoryInfo outputDir,
String path) in e:\cvs\nant\src\NAnt.VSNet\ProjectFactory.
s:line 94
   at NAnt.VSNet.SolutionBase.LoadProjects(GacCache gacCache,
ReferencesResolver refResolver, Hashtable explicitProjectDependenci
s) in e:\cvs\nant\src\NAnt.VSNet\SolutionBase.cs:line 401
   at NAnt.VSNet.SolutionBase..ctor(SolutionTask solutionTask,
TempFileCollection tfc, GacCache gacCache, ReferencesResolver refR
solver) in e:\cvs\nant\src\NAnt.VSNet\SolutionBase.cs:line 44
   at NAnt.VSNet.GenericSolution..ctor(SolutionTask solutionTask,
TempFileCollection tfc, GacCache gacCache, ReferencesResolver r
fResolver) in e:\cvs\nant\src\NAnt.VSNet\GenericSolution.cs:line 36
   at NAnt.VSNet.SolutionFactory.LoadSolution(SolutionTask solutionTask,
TempFileCollection tfc, GacCache gacCache, ReferencesRes
lver refResolver) in e:\cvs\nant\src\NAnt.VSNet\SolutionFactory.cs:line 54
   at NAnt.VSNet.Tasks.SolutionTask.ExecuteTask() in
e:\cvs\nant\src\NAnt.VSNet\Tasks\SolutionTask.cs:line 406
   at NAnt.Core.Task.Execute() in e:\cvs\nant\src\NAnt.Core\Task.cs:line 171
   at NAnt.Core.Target.Execute() in
e:\cvs\nant\src\NAnt.Core\Target.cs:line 247
   at NAnt.Core.Project.Execute(String targetName, Boolean
forceDependencies) in e:\cvs\nant\src\NAnt.Core\Project.cs:line 885
   at NAnt.Core.Project.Execute() in
e:\cvs\nant\src\NAnt.Core\Project.cs:line 837
   at NAnt.Core.Project.Run() in
e:\cvs\nant\src\NAnt.Core\Project.cs:line 922

Please send bug report to [EMAIL PROTECTED]


BUILD FILE

<?xml version="1.0" ?>
<project name="Lorien" default="build" basedir=".">
    <property name="site.parentdir" value="c:\webroot" />
    <property name="site.name" value="Lorien" />
    <property name="site.rootdir" value="${path::combine(site.parentdir,
site.name)}" />

    <property name="nant.settings.currentframework" value="net-2.0" />
    <property name="configuration" value="release" />
    <property name="bin" value="./WebRoot/bin" />
    <property name="obj" value="./obj" />
   
    <target name="build" description="Compile all files">
        <solution configuration="${configuration}">
            <projects>
                <include name="Lorien.csproj" />
            </projects>
        </solution>
    </target>
    <target name="test" description="Test with NUnit" depends="build">
        <nunit2>
            <formatter type="Plain" />
            <test assemblyname="${bin}/Lorien.dll" />
        </nunit2>
    </target>
    <target name="install" description="Install files" depends="build">
        <ifnot test="${directory::exists(site.parentdir)}">
            <fail message="Directory ${site.parentdir} not found. " />
        </ifnot>
        <copy todir="${site.rootdir}">
            <fileset basedir="WebRoot">
                <include name="**/*" />
                <exclude name="**/*.cs" />
                <exclude name="**/*.resx" />
            </fileset>
        </copy>   
    </target>
    <target name="makevdir" description="Create Virtual Directory"
depends="install">
        <mkiisdir dirpath="${site.rootdir}" vdirname="${site.name}"
anonymouspasswordsync="true" />
    </target>
    <target name="clean" description="Remove all compiled files">
        <delete>
            <fileset>
                <include name="${bin}/**" />
                <exclude name="${bin}/log4net.dll" />
                <exclude name="${bin}/nunit.framework.dll" />
                <exclude name="${bin}/anrControls.Markdown.NET.dll" />
                <include name="${obj}/**" />
            </fileset>
        </delete>
    </target>
    <target name="delvdir" description="Remove Virtual Directory">
        <deliisdir vdirname="${site.name}" failonerror="false" />
    </target>
    <target name="uninstall" description="Remove all installed files"
depends="delvdir" >
        <delete dir="${site.rootdir}" />
    </target>
</project>


-- 
Ben Hill
Revolutions Workshop
"Internet for the People"



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to