S
sireesha.parvatham
Hi,
Can somebody help me please. I am a learner using NAnt build files for
my ASP.NET web applications. It works fine for .cs files, but when i
try to use .aspx files, it gives me an error. The problem is "Partial"
modifier on the declaration of class. If I remove this, NAnt works, but
my web form gives me error.
Here is my buildfile
<?xml version="1.0"?>
<project name="Hello World" default="build">
<property name ="TestProject" value ="TestProject"/>
<property name="debug" value="true"/>
<property name ="Test" value ="Test"/>
<target name ="clean" description="remove all previously generated
files">
<delete dir ="default"/>
</target>
<target name="build">
<call target ="clean"/>
<mkdir dir="default" />
<csc target="exe" output="default/${TestProject}.dll"
debug="${debug}">
<sources>
<include name="**.cs"/>
</sources>
</csc>
<copy todir ="default">
<fileset basedir ="${Test}">
<include name ="**.cs"/>
<include name ="**.aspx"/>
</fileset>
</copy>
</target>
</project>
Here is my aspx.cs file
sing System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page //I get the error
here//
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Write("Hello Sireesha");
}
}
Can anyone tell me where I went wrong?
Thanks
Sireesha
Can somebody help me please. I am a learner using NAnt build files for
my ASP.NET web applications. It works fine for .cs files, but when i
try to use .aspx files, it gives me an error. The problem is "Partial"
modifier on the declaration of class. If I remove this, NAnt works, but
my web form gives me error.
Here is my buildfile
<?xml version="1.0"?>
<project name="Hello World" default="build">
<property name ="TestProject" value ="TestProject"/>
<property name="debug" value="true"/>
<property name ="Test" value ="Test"/>
<target name ="clean" description="remove all previously generated
files">
<delete dir ="default"/>
</target>
<target name="build">
<call target ="clean"/>
<mkdir dir="default" />
<csc target="exe" output="default/${TestProject}.dll"
debug="${debug}">
<sources>
<include name="**.cs"/>
</sources>
</csc>
<copy todir ="default">
<fileset basedir ="${Test}">
<include name ="**.cs"/>
<include name ="**.aspx"/>
</fileset>
</copy>
</target>
</project>
Here is my aspx.cs file
sing System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page //I get the error
here//
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Write("Hello Sireesha");
}
}
Can anyone tell me where I went wrong?
Thanks
Sireesha