Search code examples
visual-studio-2015microsoft-web-deploy

Visual Studio Web Deployment - update publish profile to "Precompile during publishing"


I currently have a website that is run on Windows Server 2012 R2. I have deployed my site to a specific folder on the server without using the "precompile during publishing" option. The website works and runs fine.

However, in order to improve the performance of my site, I want to update my publish profile to precompile during publishing. Will I need to delete the existing website files on the server? And what is the best way/practices of going about with this change in order not to break anything?

Note: The website is still new, so I do not need to preserve any data.


Solution

  • Updating thepublish profile works fine and the publishing takes care of the rest. It removes what needs to be removed, precompiles the code and thereafter publishes it to the server.

    enter image description here

    Using the above settings maintains the website state without causing any issues. So no other action is required from you in terms of handling the server.