Can Web.config be excluded from Publish operation?

  • Thread starter Thread starter Joseph Geretz
  • Start date Start date
J

Joseph Geretz

Visual Studio 2005:

I'm using Publish to 'mirror' my development site onto the staging site.
It's working beautifully except for one annoyance; it keeps overwriting
web.config on the staging box with the web.config from my development box.
There's got to be a way to address this. By its nature, the config file is
likely to be different on different platforms and so what I'd like is to be
able to exclude the config file from the publish operation, without having
to exclude the file from the project. Is there a way to do this?

Thanks for your advice!

Joseph Geretz
 
if you install web deployment projects, it handles
multiple web.configs

-- bruce (sqlwork.com)
 
Joseph Geretz formulated the question :
Visual Studio 2005:

I'm using Publish to 'mirror' my development site onto the staging site. It's
working beautifully except for one annoyance; it keeps overwriting web.config
on the staging box with the web.config from my development box. There's got
to be a way to address this. By its nature, the config file is likely to be
different on different platforms and so what I'd like is to be able to
exclude the config file from the publish operation, without having to exclude
the file from the project. Is there a way to do this?

Thanks for your advice!

Joseph Geretz

You can set the "build action" to "none" instead of "content".
See the properties of the file in the Solution Explorer in Visual
Studio.

Hans Kesting
 
Back
Top