CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Jeffrey Palermo (.com)

Blog moved to www.jeffreypalermo.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).



Comments

Jeremy D. Miller said:

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.
# July 30, 2005 3:21 PM

Christopher Steen - Learning .NET said:

.Net in Samples - Free eBook [Via: Ohad Israeli ]
A Customizable Login Server Control [Via: Bilal Haidar...
# August 2, 2005 12:17 AM

Christopher Steen said:

.Net in Samples - Free eBook [Via:
Ohad Israeli
]
A Customizable Login
Server Control [Via: Bilal...
# August 2, 2005 12:18 AM

Brent Asplund said:

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
# August 15, 2005 10:32 AM

About Jeffrey Palermo

Jeffrey Palermo is a software management consultant and the CTO of Headspring Systems in Austin, TX. Jeffrey specializes in Agile coaching and helps companies double the productivity of software teams. Jeffrey is an MCSD.Net , Microsoft MVP, Certified Scrummaster, Austin .Net User Group leader, AgileAustin board member, INETA speaker, INETA Membership Mentor, Christian, husband, father, motorcyclist, Eagle Scout, U.S. Army Veteran, and Texas A&M University graduate. Check out Devlicio.us!

This Blog

Syndication

News

Headspring Systems

View Jeffrey Palermo's profile on LinkedIn

See my new blog at .jeffreypalermo.com