Friday 17 July 2015

Why web.config not copied after publishing website.

I was publishing my website using visual studio 2013 all seems well but web.config was not publishing. Then i checked the property of web.config, it was None. I changed to Content and that worked for me.

Stackoverflow's member says
["Only files needed to run this application" means any build output files like DLLs and references in the bin folder and any files that have a Build Action of Content.

Since the web.config is neither of these, you'll have to change the publish option to All Project Files, or else copy the web.config manually.]