Jeffrey Palermo (.com)

Sponsors

The Lounge

News

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
How to continue using NAnt with ASP.NET 2.0 - level 300

First, if you aren't using NAnt for team builds in ASP.NET 1.1, shame on you.  Do that first.  When converting to Whidbey, you'll notice that your website no longer compiles to a single assembly and that multiple assemblies are created at JIT time.  This poses a small problem to the way we are used to scripting web application builds.

You DO NOT want to copy everything in  your website to your production server.  There is no need for your code files to be out there.  Instead, you will want your NAnt script to build the whole website and deploy the binaries.  The solution task won't work for  you with a VS 8 solution.  You'll need to use an <exec /> target and kick of aspnet_compiler to precompile your web app to a stage folder and them use a <copy /> target to kick the files out to your server. 

MsBuild does provide an AspNetCompiler task to do this, but it just kicks off aspnet_compiler.  MsBuild is still just a subset of NAnt, so I think it'll be a while before it can compete effectively (unless we find some proprietary stuff that we _really_ need).


Posted 07-29-2005 6:38 PM by Jeffrey Palermo

[Advertisement]

Comments

Jeremy D. Miller wrote re: How to continue using NAnt with ASP.NET 2.0 - level 300
on 07-30-2005 3:21 PM
Thanks for the tip. I'm perfectly content to let you go first into the world of 2.0 and tell us all how to do it. Really not looking forward to the migration from 1.1 to 2.0.
Christopher Steen - Learning .NET wrote Link Listing - August 1, 2005
on 08-02-2005 12:17 AM
.Net in Samples - Free eBook [Via: Ohad Israeli ]
A Customizable Login Server Control [Via: Bilal Haidar...
Christopher Steen wrote Link Listing - August 1, 2005
on 08-02-2005 12:18 AM
.Net in Samples - Free eBook [Via:
Ohad Israeli
]
A Customizable Login
Server Control [Via: Bilal...
Brent Asplund wrote re: How to continue using NAnt with ASP.NET 2.0 - xmlpeek
on 08-15-2005 10:32 AM
one note: I've found that xmlpeek and xmlpoke do not work with xml files that have the following namespace declaration:

xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"

by default all asp.net 2.0 web.config files have this declaration. you'll need to remove it to get xmlpeek and xmlpoke to work. You will see that intellisense will tell you that it's looking for the namespace, but from what i've seen its not required.

Brent Asplund