How can I prevent Publish Web Site from overwriting web.config?

  • Thread starter Thread starter Stan B
  • Start date Start date
S

Stan B

Publish Web Site in VS.NET 2005 helps but I don't want it to copy web.config
to from development to staging.

It doesn't seem be a way around it, or maybe I'm missing something?
 
I don't think there is an easy way around this. However, if you have settings
that you don't want to have to re-enter, you can use the appSettings section
that allows you to specify an external file from which the appSettings
section is loaded. The appSettings element attribute is 'file=...'
Peter
 
I found a workaround:

1. Publish web site to the local IIS
2. Add compiled web site from local ISS to VS.NET solution
3. Using Copy Web tool select all files in the source site except web.config
 
Back
Top