How do I prevent 'Publish Web' from overwriting config files?
问题 When I publish my Asp.Net MVC website to the production server (via VS2008), the web.config & castle.xml files are overwritten. The content of these files is obviously different between my local dev environment and the production server. How do I prevent these files from being published? 回答1: In Visual Studio solution explorer, go to your web.config file's properties. Make sure "Build Action" is "None" and "Copy to Output Directory" is "Do not copy". If you ever want to update it in the