Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

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

  1. On the Project menu, click Add New Item.

    The Add New Item dialog box appears.

  2. Select the Application Configuration File template and then click Add.

    A file named app.config is added to your project.

Community Additions

ADD
Show:
© 2015 Microsoft