w0051977
w0051977

Reputation: 15807

Web Config created in class library

I have converted an application from .NET 3.5 to .NET 4.5.2 (a web application and a class library i.e. two projects in the solution). I upgraded it to 4.0, then 4.5, then 4.5.2.

I have noticed that three new files were created in the type library folder:

web.Debug.config web.Release.config web.config

There were no new configs created in the web app folder. I assume this is because there was already a web.config. Is that correct?

Why does the class library have three web configs'? Can I delete them.

Upvotes: 0

Views: 46

Answers (2)

Amit Kumar
Amit Kumar

Reputation: 11

You can delete those web.config file if its not used in your application. now microsoft has added web transformation so you will get 3 config files web.config, web.Debug.config and web.Release.config. even you can also create more config file based on your environment like web.staging.config, etc. these config file will help you while deploying the application, while deploying you only need to specify which config do you want to use.

Upvotes: 0

3dd
3dd

Reputation: 2530

Yes you can delete them, just make sure the needed config sections are inside your main web/app.config

I've seen that sometimes when adding web references to projects, that it adds it' s own config files, even if there not used.

Upvotes: 1

Related Questions