Reputation: 26971
In WCF services and a variety of other .NET apps, I understand that app.config is used to specify settings. Is this file only used at compile time and settings get stored in the assembly or is it required at run time as well? Does it vary per project type?
Upvotes: 5
Views: 6859
Reputation: 8387
The app.config
file is renamed to YourAssemblyName.exe.config
during the build process. This is the default behaviour for all non-web projects. A web or web application project uses web.config
instead, but it is not renamed.
Upvotes: 10
Reputation: 1610
The app.config is the .NET replacement for the old school .ini files.
Upvotes: 1
Reputation: 304
If you are using app.config to supply configuration paramters to the application, then it will be needed at runtime.
Upvotes: 0
Reputation: 421968
It's a run time thing. There are a bunch of APIs in the System.Configuration
namespace that can be used to read settings from application configuration file (Web.config
in Web apps, assembly.exe.config
in others.)
Upvotes: 6