Microsoft.Extensions.Configuration.Ini 9.0.0-preview.4.24266.19
About
INI configuration provider implementation for Microsoft.Extensions.Configuration. This package enables you to read configuration parameters from INI files. You can use IniConfigurationExtensions.AddIniFile extension method on IConfigurationBuilder
to add INI configuration provider to the configuration builder.
How to Use
using System;
using Microsoft.Extensions.Configuration;
class Program
{
static void Main()
{
// Build a configuration object from INI file
IConfiguration config = new ConfigurationBuilder()
.AddIniFile("appsettings.ini")
.Build();
// Get a configuration section
IConfigurationSection section = config.GetSection("Settings");
// Read configuration values
Console.WriteLine($"Server: {section["Server"]}");
Console.WriteLine($"Database: {section["Database"]}");
}
}
To run this example, include an appsettings.ini
file with the following content in your project:
[Settings]
Server=example.com
Database=Northwind
You can include a configuration file using a code like this in your .csproj
file:
<ItemGroup>
<Content Include="appsettings.ini">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
Additional Documentation
Feedback & Contributing
Microsoft.Extensions.Configuration.Ini 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 Microsoft.Extensions.Configuration.Ini.
Packages | Downloads |
---|---|
Microsoft.AspNetCore.App
Provides a default set of APIs for building an ASP.NET Core application.
This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
|
10 |
Microsoft.AspNetCore.App
Provides a default set of APIs for building an ASP.NET Core application.
This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
|
7 |
Microsoft.AspNetCore.App
Provides a default set of APIs for building an ASP.NET Core application.
This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
|
6 |
Microsoft.AspNetCore.App
Microsoft.AspNetCore.App
|
6 |
Microsoft.AspNetCore.App
Provides a default set of APIs for building an ASP.NET Core application.
This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
|
5 |
Microsoft.AspNetCore.App
Provides a default set of APIs for building an ASP.NET Core application.
This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
This package was built from the source at:
https://github.com/aspnet/Universe/tree/1016eae4004686f7fdad13f5c329f63bbae1f3a1
|
5 |
Microsoft.AspNetCore.App
Provides a default set of API for building an ASP.NET Core application.
This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK,
or can be acquired separately using installers available at https://aka.ms/dotnet-download.
This package was built from the source at:
https://github.com/aspnet/Universe/tree/c0686cbb3c353de256da1db32829d58143b567f5
|
5 |
Microsoft.AspNetCore.App
Microsoft.AspNetCore.App
|
5 |
Microsoft.AspNetCore.App
Provides a default set of APIs for building an ASP.NET Core application.
This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
|
4 |
https://go.microsoft.com/fwlink/?LinkID=799421
.NET Framework 4.6.2
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0-preview.4.24266.19)
- Microsoft.Extensions.Configuration.FileExtensions (>= 9.0.0-preview.4.24266.19)
- Microsoft.Extensions.Configuration (>= 9.0.0-preview.4.24266.19)
- Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.0-preview.4.24266.19)
.NET 8.0
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0-preview.4.24266.19)
- Microsoft.Extensions.Configuration.FileExtensions (>= 9.0.0-preview.4.24266.19)
- Microsoft.Extensions.Configuration (>= 9.0.0-preview.4.24266.19)
- Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.0-preview.4.24266.19)
.NET 9.0
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0-preview.4.24266.19)
- Microsoft.Extensions.Configuration.FileExtensions (>= 9.0.0-preview.4.24266.19)
- Microsoft.Extensions.Configuration (>= 9.0.0-preview.4.24266.19)
- Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.0-preview.4.24266.19)
.NET Standard 2.0
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0-preview.4.24266.19)
- Microsoft.Extensions.Configuration.FileExtensions (>= 9.0.0-preview.4.24266.19)
- Microsoft.Extensions.Configuration (>= 9.0.0-preview.4.24266.19)
- Microsoft.Extensions.FileProviders.Abstractions (>= 9.0.0-preview.4.24266.19)