How Do I Precompile an ASP.NET Whidbey Application?

Posted by: Imar Spaanjaars at Sunday, February 29, 2004 4:36:59 PM in: VS 2005

UPDATE (2005-12-06): The compilation features presented in this article are obsolete. It's recommended that you look at Web Deployment Projects ( instead.

Unlike Web sites created with Visual Studio .NET 2002 or 2003, there is no need to do a full compile of the project whenever something has changed in your site. The new Code Behind feature and the Code directory used in ASP.NET Whidbey allow you to make changes without recompiling. As soon as the changed page gets requested, the .NET FRamework will recompile the page on the fly.

However, it is sometimes useful to compile the application right after you have deployed it. One reason for this precompilation is speed. Another is code protection. A compiled application does not expose its source in the ASPX pages any longer. There are two ways to compile an application at deployment time: In-place compilation and Precompilation for Deployment

Read on ... 1