1

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.

abatishchev
  • 98,240
  • 88
  • 296
  • 433
Hunt
  • 279
  • 1
  • 3
  • 13
  • I deleted my answer, Build Action isn't available on a website, it is in a WAP – Sander Rijken Aug 04 '10 at 12:22
  • possible duplicate of [How to exclude web.config when publishing with Visual Web Developer Express?](http://stackoverflow.com/questions/1288858/how-to-exclude-web-config-when-publishing-with-visual-web-developer-express) – LbISS Aug 12 '15 at 12:15

1 Answers1

2

Quite simply. Go to properties of web.config, for 'Build Action' select 'None' and 'Copy To Output Directory' select 'Do Not copy'

Maciej
  • 7,871
  • 1
  • 31
  • 36