Home > ASP.NET > Pre-compile web application by VS 2008

Pre-compile web application by VS 2008

If you create a WEBSITE by visual studio 2008 you get the option to publish it. This option also has a feature to pre-compile all aspx pages which is very useful. It makes the web site running faster (for the first time) and protect the source code.

If you create a WEB APPLICATION there is no such a option, you can only build the project and all the aspx files will be open to changed with no protection, also the web site will be slow on the first run. The answer to this problem is the Web Deployment add-on for Visual Studio. This add-on let you to add a new type of project to your web site solution which provide lots of customizations on the build process including pre-compile the web site.

Download Visual Studio® 2008 Web Deployment Projects – RTW from:

Scott Guthrie had a nice simple tutorial for this add-on on his blog:

And this is the screen shot of the property page for Web Deployment add-on project, where I can define I do not want the aspx pages to be update able, i.e., pre-compile them to binary code:


Categories: ASP.NET
  1. Mel
    March 16, 2009 at 1:44 am

    I would like to know how to pre-compile sharepoint applications.
    Does the Pre-compile also refer to SharePoint ans Windows SharePoint Services Web Applications.

  2. March 16, 2009 at 12:36 pm

    Good, question. I never tried this add-on on share point web modules, so the answer is that I do not know.

    If you could not get this add-on working for share point web projects, you can always use MS Build directly to pre-compile web applications.

  1. November 6, 2008 at 5:07 pm

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: