System.Configuration.ConfigurationManager 10.0.10

About

Provides types that support using XML configuration files (app.config). This package exists only to support migrating existing .NET Framework code that already uses System.Configuration. When writing new code, use another configuration system instead, such as Microsoft.Extensions.Configuration.

How to Use

The following example shows how to read and modify the application configuration settings.

using System;
using System.Configuration;

class Program
{
    static void Main()
    {
        try
        {
            // Open current application configuration
            Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
            KeyValueConfigurationCollection section = config.AppSettings.Settings;

            // Print settings from configuration file
            foreach (string key in section.AllKeys)
            {
                Console.WriteLine($"{key}: {section[key].Value}");
            }

            // Add new setting
            section.Add("Database", "TestDatabase");

            // Change existing setting
            section["Username"].Value = "TestUser";

            // Save changes to file
            config.Save(ConfigurationSaveMode.Modified);
            ConfigurationManager.RefreshSection(config.AppSettings.SectionInformation.Name);
        }
        catch (ConfigurationErrorsException ex)
        {
            Console.WriteLine("Error reading configuration: ");
            Console.WriteLine(ex.Message);
        }
    }
}

To run this example, include an app.config file with the following content in your project:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings>
    <add key="Server" value="example.com"/>
    <add key="Username" value="Admin"/>
  </appSettings>
</configuration>

Main Types

The main types provided by this library are:

  • System.Configuration.Configuration
  • System.Configuration.ConfigurationManager

Additional Documentation

Feedback & Contributing

System.Configuration.ConfigurationManager is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Showing the top 20 packages that depend on System.Configuration.ConfigurationManager.

Packages Downloads
SpecFlow
SpecFlow aims at bridging the communication gap between domain experts and developers by binding business readable behavior specifications to the underlying implementation. Our mission is to provide a pragmatic and frictionless approach to Acceptance Test Driven Development and Behavior Driven Development for .NET projects today.
1,135
SpecFlow
SpecFlow aims at bridging the communication gap between domain experts and developers by binding business readable behavior specifications to the underlying implementation. Our mission is to provide a pragmatic and frictionless approach to Acceptance Test Driven Development and Behavior Driven Development for .NET projects today.
1,120
FluentAssertions
A very extensive set of extension methods that allow you to more naturally specify the expected outcome of a TDD or BDD-style unit tests. Targets .NET Framework 4.7, .NET Core 2.1 and 3.0, .NET 6, as well as .NET Standard 2.0 and 2.1. Supports the unit test frameworks MSTest2, NUnit3, XUnit2, MSpec, and NSpec3. Supported by InfoSupport B.V.
735
Microsoft.Build
This package contains the Microsoft.Build assembly which is used to create, edit, and evaluate MSBuild projects.
293
FluentAssertions
A very extensive set of extension methods that allow you to more naturally specify the expected outcome of a TDD or BDD-style unit tests. Targets .NET Framework 4.7, .NET Core 2.1 and 3.0, .NET 6, as well as .NET Standard 2.0 and 2.1. Supports the unit test frameworks MSTest2, NUnit3, XUnit2, MSpec, and NSpec3. Supported by InfoSupport B.V.
208
Microsoft.CodeAnalysis.Elfie
An extensible library for fast indexing of code artifacts.
40
Microsoft.Build
This package contains the Microsoft.Build assembly which is used to create, edit, and evaluate MSBuild projects.
21
SpecFlow
SpecFlow aims at bridging the communication gap between domain experts and developers by binding business readable behavior specifications to the underlying implementation. Our mission is to provide a pragmatic and frictionless approach to Acceptance Test Driven Development and Behavior Driven Development for .NET projects today.
19
FluentAssertions
A very extensive set of extension methods that allow you to more naturally specify the expected outcome of a TDD or BDD-style unit tests. Targets .NET Framework 4.7, .NET Core 2.1 and 3.0, as well as .NET Standard 2.0 and 2.1. Supports the unit test frameworks MSTest2, NUnit3, XUnit2, MSpec, and NSpec3.
19
MySql.Data
MySql.Data.MySqlClient .Net Core Class Library
18
Microsoft.Build
This package contains the Microsoft.Build assembly which is used to create, edit, and evaluate MSBuild projects.
17
SpecFlow
SpecFlow aims at bridging the communication gap between domain experts and developers by binding business readable behavior specifications to the underlying implementation. Our mission is to provide a pragmatic and frictionless approach to Acceptance Test Driven Development and Behavior Driven Development for .NET projects today.
17
Microsoft.DotNet.Scaffolding.Shared
Contains interfaces for Project Model and messaging for scaffolding.
16
Microsoft.CodeAnalysis.VisualBasic.Features
.NET Compiler Platform ("Roslyn") support for creating Visual Basic editing experiences. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/e68227ea677b76a3c603bd616f03ea6d952b2458.
16
Microsoft.Build
This package contains the Microsoft.Build assembly which is used to create, edit, and evaluate MSBuild projects.
16
SpecFlow
SpecFlow aims at bridging the communication gap between domain experts and developers by binding business readable behavior specifications to the underlying implementation. Our mission is to provide a pragmatic and frictionless approach to Acceptance Test Driven Development and Behavior Driven Development for .NET projects today.
16

https://go.microsoft.com/fwlink/?LinkID=799421

Version Downloads Last updated
11.0.0-preview.6.26359.118 1 07/19/2026
11.0.0-preview.5.26302.115 3 06/13/2026
11.0.0-preview.4.26230.115 3 05/19/2026
11.0.0-preview.3.26207.106 4 04/25/2026
11.0.0-preview.2.26159.112 6 03/13/2026
11.0.0-preview.1.26104.118 6 02/19/2026
10.0.10 1 07/18/2026
10.0.9 3 06/13/2026
10.0.8 3 05/19/2026
10.0.7 5 04/24/2026
10.0.6 5 04/24/2026
10.0.5 6 03/13/2026
10.0.4 6 03/13/2026
10.0.3 6 02/19/2026
10.0.2 6 01/21/2026
10.0.1 7 12/11/2025
10.0.0 7 12/11/2025
10.0.0-rc.2.25502.107 7 11/04/2025
10.0.0-rc.1.25451.107 9 09/17/2025
10.0.0-preview.7.25380.108 10 08/14/2025
10.0.0-preview.6.25358.103 10 08/14/2025
10.0.0-preview.5.25277.114 11 07/11/2025
10.0.0-preview.4.25258.110 12 05/24/2025
10.0.0-preview.3.25171.5 12 05/24/2025
10.0.0-preview.2.25163.2 12 05/24/2025
10.0.0-preview.1.25080.5 12 05/24/2025
9.0.18 1 07/18/2026
9.0.17 3 06/13/2026
9.0.16 3 05/19/2026
9.0.15 5 04/24/2026
9.0.14 6 03/13/2026
9.0.13 6 02/19/2026
9.0.12 7 01/21/2026
9.0.11 7 12/11/2025
9.0.10 8 11/04/2025
9.0.9 9 09/16/2025
9.0.8 10 08/14/2025
9.0.7 11 07/10/2025
9.0.6 11 07/10/2025
9.0.5 12 05/23/2025
9.0.4 12 05/23/2025
9.0.3 12 05/23/2025
9.0.2 15 02/19/2025
9.0.1 14 02/19/2025
9.0.0 14 02/19/2025
9.0.0-rc.2.24473.5 15 02/19/2025
9.0.0-rc.1.24431.7 14 02/19/2025
9.0.0-preview.7.24405.7 14 02/19/2025
9.0.0-preview.6.24327.7 14 02/19/2025
9.0.0-preview.5.24306.7 13 02/19/2025
9.0.0-preview.4.24266.19 14 02/19/2025
9.0.0-preview.3.24172.9 14 02/19/2025
9.0.0-preview.2.24128.5 14 02/19/2025
9.0.0-preview.1.24080.9 14 02/19/2025
8.0.1 14 02/19/2025
8.0.0 22 02/19/2025
8.0.0-rc.2.23479.6 14 02/19/2025
8.0.0-rc.1.23419.4 14 02/19/2025
8.0.0-preview.7.23375.6 14 02/19/2025
8.0.0-preview.6.23329.7 14 02/19/2025
8.0.0-preview.5.23280.8 15 02/19/2025
8.0.0-preview.4.23259.5 14 02/19/2025
8.0.0-preview.3.23174.8 15 02/19/2025
8.0.0-preview.2.23128.3 14 02/19/2025
8.0.0-preview.1.23110.8 14 02/19/2025
7.0.0 14 02/19/2025
7.0.0-rc.2.22472.3 14 02/19/2025
7.0.0-rc.1.22426.10 14 02/19/2025
7.0.0-preview.7.22375.6 14 02/19/2025
7.0.0-preview.6.22324.4 14 02/19/2025
7.0.0-preview.5.22301.12 14 02/19/2025
7.0.0-preview.4.22229.4 12 05/24/2025
7.0.0-preview.3.22175.4 14 02/19/2025
7.0.0-preview.2.22152.2 14 02/19/2025
7.0.0-preview.1.22076.8 14 02/19/2025
6.0.2 14 02/19/2025
6.0.1 14 02/19/2025
6.0.0 42 08/06/2024
6.0.0-rc.2.21480.5 14 02/19/2025
6.0.0-rc.1.21451.13 14 02/19/2025
6.0.0-preview.7.21377.19 14 02/19/2025
6.0.0-preview.6.21352.12 14 02/19/2025
6.0.0-preview.5.21301.5 15 02/19/2025
6.0.0-preview.4.21253.7 13 02/19/2025
6.0.0-preview.3.21201.4 14 02/19/2025
6.0.0-preview.2.21154.6 14 02/19/2025
6.0.0-preview.1.21102.12 14 02/19/2025
5.0.0 14 02/19/2025
5.0.0-rc.2.20475.5 14 02/19/2025
5.0.0-rc.1.20451.14 14 02/19/2025
5.0.0-preview.8.20407.11 14 02/19/2025
5.0.0-preview.7.20364.11 14 02/19/2025
5.0.0-preview.6.20305.6 13 02/19/2025
5.0.0-preview.5.20278.1 15 02/19/2025
5.0.0-preview.4.20251.6 14 02/19/2025
5.0.0-preview.3.20214.6 14 02/19/2025
5.0.0-preview.2.20160.6 14 02/19/2025
5.0.0-preview.1.20120.5 14 02/19/2025
4.7.0 14 02/19/2025
4.7.0-preview3.19551.4 13 02/19/2025
4.7.0-preview2.19523.17 14 02/19/2025
4.7.0-preview1.19504.10 14 02/19/2025
4.6.0 14 02/19/2025
4.6.0-rc1.19456.4 15 02/19/2025
4.6.0-preview9.19421.4 14 02/19/2025
4.6.0-preview9.19416.11 14 02/19/2025
4.6.0-preview8.19405.3 14 02/19/2025
4.6.0-preview7.19362.9 15 02/19/2025
4.6.0-preview6.19303.8 14 02/19/2025
4.6.0-preview6.19264.9 14 02/19/2025
4.6.0-preview5.19224.8 14 02/19/2025
4.6.0-preview4.19212.13 14 02/19/2025
4.6.0-preview3.19128.7 14 02/19/2025
4.6.0-preview.19073.11 13 02/19/2025
4.6.0-preview.18571.3 14 02/19/2025
4.5.0 1,052 08/06/2024
4.5.0-rc1 14 02/19/2025
4.5.0-preview2-26406-04 15 02/19/2025
4.5.0-preview1-26216-02 14 02/19/2025
4.5.0-preview1-25914-04 15 02/19/2025
4.4.1 17 09/04/2024
4.4.0 731 08/06/2024
4.4.0-preview2-25405-01 15 02/19/2025
4.4.0-preview1-25305-02 15 02/19/2025