Why is web.config not being copied when publishing an ASP.NET web project with the option "Only files needed to run this application"?

How to fix it?

+9
visual-studio-2008 visual-studio web-config
Aug 20 '09 at 14:17
source share
3 answers

“Only files needed to run this application” means any output assembly files, such as DLLs and links in the bin folder, and any files that contain the action to create the content.

Since web.config is neither one nor the other, you will have to change the publishing option to all project files or copy the web.config file manually.

+9
Aug 20 '09 at 14:24
source share

When you say "ASP.NET web project," do you mean "ASP.NET web application project"?

If so, the web.config file should have a default Content assembly action. As Brandon mentioned, the content is then copied to the publication destination.

To check, select the web.config file in Solution Explorer, then use the properties window. Example:

example http://photos.tiredstudent.com/WebStorageHandler.ashx?tb=false&id=558

+6
Aug 20 '09 at 14:34
source share

I know this sounds silly, but make sure it is marked as “Content” as it creates an action under its properties.

+3
Nov 01
source share



All Articles