System.Configuration.ConfigurationManager 11.0.0-preview.7.26381.103

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
DevExpress.DataAccess
This package enables you to connect to various data providers (such as databases, Excel and CSV files, Entity Framework and object data sources).
48
DevExpress.Reporting.Core
This package implements core functionality for DevExpress XtraReports Suite.
48
DevExpress.DataAccess
This package enables you to connect to various data providers (such as databases, Excel and CSV files, Entity Framework and object data sources).
36
Stripe.net
Stripe.net is a sync/async .NET 4.6.1+ client, and a portable class library for the Stripe API. (Official Library)
32
DevExpress.DataAccess
This package enables you to connect to various data providers (such as databases, Excel and CSV files, Entity Framework and object data sources).
31
Stripe.net
Stripe.net is a sync/async .NET 4.6.1+ client, and a portable class library for the Stripe API. (Official Library)
31
DevExpress.Reporting.Core
This package implements core functionality for DevExpress XtraReports Suite.
30
Stripe.net
Stripe.net is a sync/async .NET 4.6.1+ client, and a portable class library for the Stripe API. (Official Library)
30
DevExpress.Data
This package provides basic functionality for data-aware DevExpress controls.
29
DevExpress.Reporting.Core
This package implements core functionality for DevExpress XtraReports Suite.
28
DevExpress.DataAccess
This package enables you to connect to various data providers (such as databases, Excel and CSV files, Entity Framework and object data sources).
28
DevExpress.Data
This package provides basic functionality for data-aware DevExpress controls.
28
Stripe.net
Stripe.net is a sync/async .NET 4.6.1+ client, and a portable class library for the Stripe API. (Official Library)
27

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

.NET 10.0

.NET 11.0

.NET Framework 4.6.2

.NET Standard 2.0

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