Hi Everyone, I am new to this group.I have started working on NAnt recently and I have been facing some issues.I have web reference to a main project(which is basically a webservice hosted on my local computer as well.) Following is the build script I have:
<?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;TRACE" /> <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"/> </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" /> </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> <!-- Used for WebService --> <target name="CallWebService"> <wsdl path="http://localhost/BillingService/BillingService.asmx" language="CS" namespace="BillingService" outfile="BillingService.cs" failonerror="false" /> </target> <!-- Builds the necessary projects --> <target name="build" depends="init,clean,getlatest,references,webreferences,deploy" description="compiles the source code"> <property name="output" value="${nant.project.basedir}\ContentDisplayer\bin" /> <call target="InvokeCOM" /> <call target="CallWebService" /> <mkdir dir="${output}" /> <vjc target="${target.type}" output="${output}\ContentDisplayer.dll" debug="${debug}" define="${define}"> <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" /> <include name="ContentLib\bin\PageContentLib.dll" /> <include name="BillingService\bin\BillingService.dll" /> <include name="extraDLL\Interop.ICSCOMLib.dll" /> </references> <sources> <include name="ContentDisplayer\*.jsl" /> </sources> </vjc> <solution solutionfile="NAntTestProject\NAntTestProject.sln" configuration="release"> <webmap> <map url="http://localhost/NAntTestProject/NAntTestProject.csproj" path = "NAntTestProject\NAntTestProject.csproj" /> </webmap> </solution> </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}" define="${define}" > <sources> <include name="BillingService\*.cs" /> <include name="BillingService\*.asmx" /> </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" /> <copy todir="${localpath}\ContentDisplayer"> <fileset> <include name = "ContentDisplayer\*.aspx" /> <include name = "ContentDisplayer\*.asax" /> <include name = "ContentDisplayer\*.asmx" /> </fileset> </copy> </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> Its the target name="CallWebService" that fails and the error that I am getting is: Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Could not load type 'BillingService.Global'. Source Error: Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="BillingService.Global" %> where BillingService is the name of the webservice project. Please note that I donot get this error if I run the same project from Visual Studio envrionment(in taht case everything runs fine).But it fails only when ran through NAnt. Any help in this regard is much appreciated Thanks Mandar __________________________________________________ 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