Wicked Strategery

Where servers serve, routers route, and configulators configulate

Pre-compiling ASP.NET

Written by: Doug Jenkinson

Article

Pre-compiling ASP.NET

I recently had the fun of writing an ASP.net site that made extensive use of a number of 3.5 features - extension methods, LINQ-to-SQL, LINQ-to-XML, etc. When the time came to deploy the site, I was dismayed to find out the host had not and would not install .NET 3.5 on the server.

This is when I found out about pre-compiling ASP.NET code (specifically aspnet-compiler.exe) - it saved the day. I'm sure this is the sort of thing that experienced ASP.NET developers already know about, but for a developer that doesn't write ASP.NET sites all that often, this is just fantastic.

The primary benefit of pre-compiling is performance - avoiding the delay in spinning up the .NET application upon first visit. As a side-effect, since my server didn't have the 3.5 compiler, my application would not run. But since it has been compiled ahead of time and linked to the 3.5 binaries, it will run in the environment.

The down side is, so far, I haven't found the right way to deploy all the needed dependencies automatically - probably because my development and deployment environment are both 3.5 whereas the hosting environment is 2.0. I find I have to copy any of the 3.5 binaries needed by hand - minor inconvenience at this point.

I haven't automated it yet either, I'm still working out the best way to fit this into the deployment process and the best set of options to use. But the results are clear - my 3.5 code runs on a 2.0 server.


Metadata


Revisions

  • v1.0 (16 Feb 2010) - Article published.

Tags

About the Author

Doug Jenkinson is an avid technology aficionado and Software Engineer with Hyland Software, Inc. / entrepreneur in Copley, OH.

Read More...

Linquistory

"The Wørd" of the Night: Truthiness, courtesy of Stephen Colbert

Wikiality

Breadcrumbs

Top 10 Developer Reasons Why Software Breaks

OPML file with the feeds I read.

Usability In Software

Impressions of Scrum

Pre-compiling ASP.NET

Personal Links

LinkedIn

Google Profile

My del.icio.us

twitter

My flickr

My ClaimID

Projects

twitlbl

Site Updates

I've added some spiffy new features to my site. You can read all about them in the changelog.

Internet Quote

"Yeah man, I tell ya what, man. That dang ol' Internet, man. You just go on there and point and click. Talk about W-W-dot-W-com. An' lotsa nekkid chicks on there, man. Click. Click. Click. Click. Click. It's real easy, man." - Boomhauer, King of the Hill

Feeds

RSS OPML