Wednesday, December 21, 2011

Precompile Web Application Project

If you have a website project, you have the option to precompile the website. So, the website startup (in IIS) will be responsive. But, for Web Application project, you don't have such precompile option and you will have to do it manually.

Steps to precompile your Web Application project:
  1. Publish your project by right click on the project name and choose Publish.
  2. Choose "File System" in the Publish Method and specify the location.
  3. Once the publishing has completed, run the "Visual Studio Command Prompt (2010)" from the Windows Startup menu.
  4. Then, type the following command and press Enter.
                    aspnet_compiler -p WebApp -v / WebAppPrecompile

The above command will precompile the "WebApp" locally without creating the Virtual Directory in the IIS.

Reference:
http://msdn.microsoft.com/en-us/library/ms227976%28v=VS.90%29.aspx

No comments:

Post a Comment