NAnt for .net 2.0

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
 
G

Guest

I have never used NAnt, but from your description it sounds loike a .Net
version thing. PArtial classes are new to .Net 2.0 so perhaps NAnt is trying
to build for 1.1?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,067
Latest member
HunterTere

Latest Threads

Top