How to: Add Application Configuration Files to C# Projects
You can customize how the common language runtime locates and loads assembly files by adding application configuration files (app.config files) to your C# projects. For more information about application configuration files, see How the Runtime Locates Assemblies.
When you build your project, the development environment automatically creates a copy of your app.config file, changes its file name so that it has the same file name as your executable, and then moves the new .config file in the bin directory.
To add an application configuration file to your C# project
On the Project menu, click Add New Item.
The Add New Item dialog box appears.
Select the Application Configuration File template and then click Add.
A file named app.config is added to your project.
See Also
Tasks
How to: Use an Application Configuration File to Target a .NET Framework Version