Can Web.config be excluded from Publish operation?

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
 
B

bruce barker

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

-- bruce (sqlwork.com)
 
H

Hans Kesting

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top