Using the appSettings Section
You can use the configuration tools to create and modify Microsoft .NET Framework <appSettings> sections. Note that the <appSettings> sections must be included in a single file; they should not be distributed across multiple files. Examples of files that you cannot edit include the Machine.config file and <appSettings> sections that include the optional file attribute that specifies a relative path to an external configuration file.
To configure an <appSettings> section
- Open the configuration file. For more information, see Using the Configuration Tools.
- On the Blocks menu click Add Application Settings.
- Click the plus sign icon for Application Settings, and then click Add Setting to add a setting.
- Set the Key and Value properties in the Setting properties pane.
You can also edit the application settings by directly editing the XML in the configuration file. You can add and remove keys at design time as shown in the following example.
<appSettings> <add key="key1CurrentFile" value="value1forKey1InCurrentFile"/> <remove key="key2InCurrent" /> </appSettings>
For more information on the XML elements, see .NET appSettings Element on MSDN®.