Visual Studio precompiles web sites when building via the
Make VS.NET action, but copying/publishing/deploying via the
Publish web site /
Copy web site functionality in Visual Studio is a manual process. Some alternatives:
1) Use the
Web Deploy action/tool.
2) Use Web Deployment Projects (
for VS 2005,
VS 2008,
VS 2010, and
VS 2013) or Publish Profiles (
VS 2012) or Web Deploy 3.6 (for
VS 2015).
3) Create a Web Site Deployment project (for
VS 2005,
VS 2008, or
2010) to deploy the precompiled web site after building by running it on the deployment server via the VBP
Windows Installer action.
4) Use the VBP
Copy Files or
FTP actions (depending on the accessibility of the target server) to
copy the necessary files to the deployment server after building. One benefit of this method is incremental copying capability (only files that have actually changed since the last copy).
5) Following the Make VS.NET step to build the project, add a
Run Program step invoking
aspnet_compiler.exe to deploy the web site (see attached sample).