Hi Guys,

I am suddenly getting an Internal Error when running
the NAnt build file.It wasn't happening before and I
don't think anything major has changed in my .build
file but I am getting the following error:


build:

 [solution] Starting solution build.

BUILD FAILED

INTERNAL ERROR

System.NullReferenceException: Object reference not
set to an instance of an 
object.
   at NAnt.VSNet.ProjectFactory.IsUrl(String fileName)
   at NAnt.VSNet.ManagedProjectBase.get_ProjectPath()
   at
NAnt.VSNet.CSharpProject.VerifyProjectXml(XmlElement
docElement)
   at NAnt.VSNet.ProjectBase..ctor(XmlElement
xmlDefinition, SolutionTask 
solutionTask, TempFileCollection temporaryFiles,
GacCache gacCache, 
ReferencesResolver referencesResolver, DirectoryInfo
outputDir)
   at NAnt.VSNet.ManagedProjectBase..ctor(SolutionBase
solution, String 
projectPath, XmlElement xmlDefinition, SolutionTask
solutionTask, 
TempFileCollection tfc, GacCache gacCache,
ReferencesResolver refResolver, 
DirectoryInfo outputDir)
   at NAnt.VSNet.CSharpProject..ctor(SolutionBase
solution, String projectPath, 
XmlElement xmlDefinition, SolutionTask solutionTask,
TempFileCollection tfc, 
GacCache gacCache, ReferencesResolver refResolver,
DirectoryInfo outputDir)
   at
NAnt.VSNet.ProjectFactory.CreateProject(SolutionBase
solution, 
SolutionTask solutionTask, TempFileCollection tfc,
GacCache gacCache, 
ReferencesResolver referencesResolver, DirectoryInfo
outputDir, String 
projectPath)
   at
NAnt.VSNet.ProjectFactory.LoadProject(SolutionBase
solution, SolutionTask 
solutionTask, TempFileCollection tfc, GacCache
gacCache, ReferencesResolver 
referencesResolver, DirectoryInfo outputDir, String
path)
   at NAnt.VSNet.SolutionBase.LoadProjects(GacCache
gacCache, 
ReferencesResolver refResolver)
   at NAnt.VSNet.SolutionBase..ctor(SolutionTask
solutionTask, 
TempFileCollection tfc, GacCache gacCache,
ReferencesResolver refResolver)
   at
NAnt.VSNet.SolutionFactory.LoadSolution(SolutionTask
solutionTask, 
TempFileCollection tfc, GacCache gacCache,
ReferencesResolver refResolver)
   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()

Please send bug report to [EMAIL PROTECTED]

Total time: 0.1 seconds.



My build file looks like this:
<?xml version="1.0"?>
<project name="wwwroot" default="build">
  <property name="project.version" value="1.0" />
  <property name="project.config" value="release" />
  <property name="debug" value="true" />
  <property name="define"
value="DEBUG=True;TRACE=True" />
  <property name="target.type" value="library" />
  <property name="output.type" value="dll" /> 

   <!-- Use TStamp to set a proerty to the the current
datetime defining the format -->

  <tstamp property="Build.DateTime"
pattern="yyyy-MM-dd.HHmm" verbose="true" />

  <target name="clean" description="cleans build
directory">
     <delete dir="NAntTestProject\bin" verbose="true"
failonerror="false"/>
     <delete dir="ContentLib\bin" verbose="true"
failonerror="false"/>
     <delete dir="ContentLib\obj" verbose="true"
failonerror="false"/>
     <delete dir="BillingService\bin" verbose="true"
failonerror="false"/>
     <delete dir="ContentDisplayer\bin" verbose="true"
failonerror="false"/>
     <delete dir="Templates\bin" verbose="true"
failonerror="false"/>
  </target>    

  <!-- Used to get latest from VSS -->
  <target name="getlatest">  
  <property name="build.dir"
value="${nant.project.basedir}" />
  <property name="ssdir" value="C:\Program
Files\Microsoft Visual Studio\VSS\srcsafe.ini" />
  <property name="ssuser" value="Mambre" />
  <property name="sspassword" value="skylight" />
  <mkdir dir="${build.dir}" />
  <vssget localpath="${build.dir}\ContentLib"
           recursive="true"
           dbpath="${ssdir}"
           username="${ssuser}"
           password="${sspassword}"
           replace="true"
           path="$/Communications/Current/ContentLib"
/>
  <vssget localpath="${build.dir}\BillingService"
           recursive="true"
           dbpath="${ssdir}"
           username="${ssuser}"
           password="${sspassword}"
           replace="true"
          
path="$/Communications/Current/BillingService" />
  <vssget localpath="${build.dir}\ContentDisplayer"
           recursive="true"
           dbpath="${ssdir}"
           username="${ssuser}"
           password="${sspassword}"
           replace="true"
          
path="$/Communications/Current/ContentDisplayer" />
  <vssget localpath="${build.dir}\ContentCreator"
           recursive="true"
           dbpath="${ssdir}"
           username="${ssuser}"
           password="${sspassword}"
           replace="true"
          
path="$/Communications/Current/ContentCreator" />
  <vssget localpath="${build.dir}\NAntTestProject"
           recursive="true"
           dbpath="${ssdir}"
           username="${ssuser}"
           password="${sspassword}"
           replace="true"
           path="$/NAntTestProject" />
  </target> 
    

  <target name="init">
    <call target="${project.config}" />
  </target>

  <target name="debug">
    <property name="project.config" value="debug" />
    <property name="build.debug" value="true" />
    <property name="basedir.suffix" value="-debug" />
  </target>

  <target name="release">
    <property name="project.config" value="release" />
    <property name="build.debug" value="false" />
    <property name="basedir.suffix" value="-release"
/>
  </target>  
  
  <!-- Used for COM projects -->
  <target name="InvokeCOM" >
    <tlbimp typelib="C:\Program Files\CyberSource
Corporation\CyberSource Developer Kit for
ASP\ics2com.dll" 
output="${nant.project.basedir}\extraDLL\Interop.ICSCOMLib.dll"
namespace="ICSCOMLib">        
    </tlbimp>
  </target>

  <!-- Builds the necessary projects -->
  <target name="build"
depends="init,clean,references,webreferences,deploy"
description="compiles the source code">
   <property name="output"
value="${nant.project.basedir}\ContentDisplayer\bin"
/>   
   <call target="InvokeCOM" />
   <!--<call target="CallWebService" />-->
   <solution
solutionfile="ContentDisplayer\ContentDisplayer.sln"
configuration="release">          
      <webmap>
        <map
url="http://localhost/ContentDisplayer/ContentDisplayer.vjsproj";
path = 
"ContentDisplayer\ContentDisplayer.vjsproj" />
      </webmap>         
    </solution>  
    <delete dir="dist_NAntTestProject" verbose="true"
failonerror="false"/>
    <exec
program="C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe"
     useruntimeengine="true">
            <arg value="-p" />
            <arg
value="${nant.project.basedir}\NAntTestProject" />
            <arg value="-v" />
            <arg value="NAntTestProject" />
            <arg
value="${nant.project.basedir}\dist_NAntTestProject"
/>
    </exec>    
  </target> 

 <!-- Used for project references..common libraries
-->
 <target name="references" description="references for
various web apps">
   <mkdir dir="${nant.project.basedir}\ContentLib\bin"
/>
   <vjc target="${target.type}"
output="${nant.project.basedir}\ContentLib\bin\PageContentLib.dll"
debug="${debug}" 
      define="${define}">
     <sources>
      <include name="ContentLib\*.jsl" />     
     </sources> 
     <references>
      <include name="System.dll" />
      <include name="System.Data.dll" />
      <include name="System.Web.dll" />
      <include name="System.Windows.Forms.dll" />
      <include name="System.Drawing.dll" />
      <include name="System.Xml.dll" />
      <include name="vjslib.dll" />
     </references>
   </vjc>   
  </target>
  <target name="webreferences" description="web
references for WebServices">    
   <mkdir
dir="${nant.project.basedir}\BillingService\bin" />   
   <csc target="${target.type}"
output="${nant.project.basedir}\BillingService\bin\BillingService.dll"
debug="${debug}">
     <sources>
      <include name="BillingService\*.cs" />         
     </sources>
     <references>
      <include name="System.dll" />
      <include name="System.Data.dll" />
      <include name="System.Web.dll" />
      <include name="System.Web.Services.dll" />
      <include name="System.Xml.dll" />
     </references>
   </csc>
  </target>

 <!-- Set up some properties to define the from and to
on the email -->

      <property name="EMAILTO"
value="[EMAIL PROTECTED]" />

      <property name="EMAILCC"
value="[EMAIL PROTECTED]" />

      <property name="EMAILFROM" value="buildMaster"
/> 
     

      <!-- Define which Targets will be executed when
the script fails or succeeds -->

      <property name="nant.onsuccess" value="Success"
/>

      <property name="nant.onfailure" value="Failure"
/>
     

      <!-- Use of ${Build.DateTime} so a new file is
created each time.    -->

      <property name="LOG_DIR" value="C:\Logfiles" />

      <property name="Build.Success.Log"
value="${LOG_DIR}/SuccessfulBuildLog-${Build.DateTime}.txt"
/>

      <property name="Build.Failure.Log"
value="${LOG_DIR}/FailedBuildLog-${Build.DateTime}.txt"
/>
     

      <!-- Start recording a success and a failure Log
file -->

      <record name="${Build.Success.Log}" level="Info"
action="Start" />

      <record name="${Build.Failure.Log}"
level="Verbose" action="Start" />

     

      <!-- Build targets go here -->

     

      <!-- If the script fails execute the Failure
target which depends on CloseLogs and Mail.Failure -->

      <target name="Failure"
depends="CloseLogs,Mail.Failure">

            <!-- Since the script failed Delete the
Success Log -->

            <delete file="${Build.Success.Log}" />

      </target>

      <!-- If the script Succeeds execute the Success
target which depends on CloseLogs and Mail.Success -->

      <target name="Success"
depends="CloseLogs,Mail.Success">

            <!-- Here you might want to copy the good
build to another directory as the last good build -->
            <call target="zip" />

            <!-- Since the script failed Delete the
Success Log -->

            <delete file="${Build.Failure.Log}" />

      </target>
 
      <!-- Stop recording Logs -->

      <target name="CloseLogs" description="Closes log
files - do not call independently">

            <record name="${Build.Success.Log}"
action="Close" />

            <record name="${Build.Failure.Log}"
action="Close" />

      </target>
     

      <!-- Send an email telling everyone the build
failed -->

      <target name="Mail.Failure">

            <mail from="${EMAILFROM}"
tolist="${EMAILTO}" cclist="${EMAILCC}"

                  subject="Build Failed on
${Build.DateTime}"

                  message="The Automated build Failed
on ${Build.DateTime}. The log file is attached to this
email."

                  mailhost="MOAB.esintech.local">

                  <!-- Attach the log file to the
email -->

                  <attachments>

                        <includes
name="${Build.Failure.Log}" />

                  </attachments>

            </mail>

      </target>     

      <!-- Send an email telling everyone the build
Succeeded -->

      <target name="Mail.Success">

            <mail from="${EMAILFROM}"
tolist="${EMAILTO}" cclist="${EMAILCC}"

                  subject="Build was SuccessFul on
${Build.DateTime}"

                  message="The Automated build was
succesful on ${Build.DateTime}."

                  mailhost="MOAB.esintech.local">

            </mail>

      </target>
     
      <!-- Used to deploy various projects and create
IIS Virtual Directories -->
      <target name="deploy" description="Creates
Virtual Directory">
        <property name="localpath"
value="${nant.project.basedir}" />
        <mkiisdir dirpath="${localpath}\ContentLib"
vdirname="ContentLib" authntlm="true" />     
        <mkiisdir
dirpath="${nant.project.basedir}\BillingService"
vdirname="BillingService" />                
        <mkiisdir
dirpath="${localpath}\NAntTestProject"
vdirname="NAntTestProject" authntlm="true" />
        <mkiisdir
dirpath="${localpath}\ContentDisplayer"
vdirname="ContentDisplayer" authntlm="true" />
        <mkiisdir
dirpath="${localpath}\ContentCreator"
vdirname="ContentCreator" authntlm="true" />
      </target>
      
   <target name="zip" description="zips the build
after successful compilation">
    <property name="build.dir"
value="${nant.project.basedir}/${nant.project.name}_${project.version}${basedir.suffix}"/>
    <zip zipfile="${build.dir}.zip">
      <fileset basedir="${nant.project.basedir}">
        <include name="ContentDisplayer\**" /> 
        <include name="NAntTestProject\**" />       
      </fileset>
    </zip>
  </target>
 
</project>

Please let me know if anyone is aware what can cause
this error.

Thanks
M.S.A

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to