dcolumbus
dcolumbus

Reputation: 9722

ASP.NET, VisualStudio 2010: Web.config not publishing?

For some mysterious reason, all of a sudden when I publish my website, Web.config does not get coppied over.

At first when I saw that the properties of Web.config was set to "Do not copy", that seemed like the reason... but when I change the option, it doesn't stick.

Is there some shortcut key or some global TFS setting that might effect this?

This has never happened before...

Upvotes: 12

Views: 5162

Answers (2)

Ravi Ram
Ravi Ram

Reputation: 24488

In Solution Explorer> Right click on Web.config file > Properties.

In the Properties dialog box,

set Build Action = Content

set Copy to Output Directory = Copy always

enter image description here

Upvotes: -1

dcolumbus
dcolumbus

Reputation: 9722

Apparently, if you look at "Properties", there is an option called "Build Action" ... set this to "Content" if you would like this file to be coppied over on Publish. If not, select "None"

Reference: http://forums.asp.net/p/1528920/3698633.aspx

Upvotes: 25

Related Questions