Say I have 2 projects, where project A references project B. Project A is a web application project and project B is a class library.
The class library has an app.config file where some settings are stored. When I compile project A, projectB.dll is created in the bin folder.
What happens to the contents of the app.config file when the web application is deployed? Are the settings compiled into ProjectB.dll?
Is it possible to retrieve the contents of the app.config using a tool like reflector or ILSpy?
The application configuration file usually lives in the same directory as your application. For web applications, it is named Web. config. For non-web applications, it starts life with the name of App.
App. Config is an XML file that is used as a configuration file for your application. In other words, you store inside it any setting that you may want to change without having to change code (and recompiling). It is often used to store connection strings.
You can have a web. config for each folder under your web application. app. config is used for windows applications.
You can add an app.config
to a library project, but it is not used or included in any of the output.
Configuration is meant to be done in the application - not in the library. So you need to put the configuration in question in the web.config of your web application, not in app.config of a library.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With