Reputation: 61021
How can I add a configuration file to Visual Studio 2012 Web Express library project?
I tried following the msdn instructions but I just don't have the Application Configuration File
template. I tried looking all over in the properties of the project to specify the config file, but it's nowhere to be found.
Any ideas?
Upvotes: 3
Views: 5347
Reputation: 878
In ASP.NET, it's called a "Web application file", and the filed is named as "web.config".
Upvotes: 2
Reputation: 1499800
Libraries don't generally have configuration files. When an application loads, the configuration it loads will be the one associated with that application - not the libraries within it.
You can create app config files for libraries, and load them explicitly - but it's a bit of a pain. Consider exposing configuration directly in your API, and allowing the application consuming the library to provide the configuration appropriately.
Upvotes: 3