Exclude web.config from server when publishing website (not WAP) VS2005
问题 How do I exclude Web.config from server when publishing website (not web application project) in Visual Studio 2005 I can see information how to add setting to the Web.Config but in this instance the Web.config is fine on the servers; so I do not want the problem of introducing possible faulty Web.config to a live environment. 回答1: Quite simply. Go to properties of web.config, for 'Build Action' select 'None' and 'Copy To Output Directory' select 'Do Not copy' 来源: https://stackoverflow.com