PDA

View Full Version : Deploying/publishing Visual Studio web sites


kinook
09-07-2006, 12:34 PM
Visual Studio precompiles web sites when building via the Make VS.NET (http://www.kinook.com/VisBuildPro/Manual/makevs_net.htm) action, but copying/publishing/deploying via the Publish web site (http://msdn.microsoft.com/en-us/library/1y1404zt(VS.100).aspx) / Copy web site (http://msdn.microsoft.com/en-us/library/xay0wxbf(VS.100).aspx) functionality in Visual Studio is a manual process. Some alternatives:

1) Use the Web Deploy (http://www.kinook.com/VisBuildPro/Manual/msdeploy.htm) action/tool.

2) Use Web Deployment Projects (for VS 2005 (http://msdn.microsoft.com/en-us/library/aa479568.aspx), VS 2008 (http://www.microsoft.com/downloads/details.aspx?FamilyId=0AA30AE8-C73B-4BDD-BB1B-FE697256C459&displaylang=en), VS 2010 (http://www.microsoft.com/downloads/en/details.aspx?FamilyID=89F2C4F5-5D3A-49B6-BCAD-F776C6EDFA63&displaylang=en), and VS 2013 (http://blogs.msdn.com/b/visualstudio/archive/2014/04/17/visual-studio-installer-projects-extension.aspx)) or Publish Profiles (VS 2012 (http://sedodream.com/2013/01/06/CommandLineWebProjectPublishing.aspx)) or Web Deploy 3.6 (for VS 2015 (https://azure.microsoft.com/en-us/blog/web-deploy-3-6-beta-released/)).

3) Create a Web Site Deployment project (for VS 2005 (http://msdn.microsoft.com/en-us/library/ms227401%28v=VS.80%29.aspx), VS 2008 (http://msdn.microsoft.com/en-us/library/ms227401.aspx), or 2010 (http://weblogs.asp.net/scottgu/archive/2010/07/29/vs-2010-web-deployment.aspx)) to deploy the precompiled web site after building by running it on the deployment server via the VBP Windows Installer (http://www.visualbuild.com/Manual/msiaction.htm) action.

4) Use the VBP Copy Files (http://www.visualbuild.com/Manual/copyfilesaction.htm) or FTP (http://www.visualbuild.com/Manual/ftp.htm) actions (depending on the accessibility of the target server) to copy the necessary files to the deployment server (http://www.kinook.com/Forum/showthread.php?threadid=458) 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 (http://www.visualbuild.com/Manual/runprogramaction.htm) step invoking aspnet_compiler.exe (http://msdn2.microsoft.com/en-us/library/ms229863.aspx) to deploy the web site (see attached sample).