Any-Config
1.0.0
See the version list below for details.
dotnet add package Any-Config --version 1.0.0
NuGet\Install-Package Any-Config -Version 1.0.0
<PackageReference Include="Any-Config" Version="1.0.0" />
paket add Any-Config --version 1.0.0
#r "nuget: Any-Config, 1.0.0"
// Install Any-Config as a Cake Addin #addin nuget:?package=Any-Config&version=1.0.0 // Install Any-Config as a Cake Tool #tool nuget:?package=Any-Config&version=1.0.0
AnyConfig
A .net configuration library to make configuration of multi-target applications easier.
Description
AnyConfig makes configuration on solutions which mix .Net Core and .Net Framework projects easier. It abstracts away ConfigurationManager and IConfiguration loading with no dependencies on Microsoft implementation. You can instead use ConfigurationManager to load either json or xml configuration files, as well as the IConfiguration interface. This allows you to upgrade to json configuration files even for older projects without changing any code!
Installation
PM> Install-Package AnyConfig
Features
- Backwards compatible interface for ConfigurationManager for xml and json
- Supports IConfiguration interface for xml and json
- Supports generics for simple configuration value lookups
- Automatic discovery of configuration files for .Net Core or .Net Framework projects
Usage
Simplest usage is using the dedicated generics interface:
var isEnabled = Config.Get<bool>("IsEnabled");
You can also bind your own configuration class:
var testConfiguration = Config.Get<MyTestConfiguration>();
Grab an IConfiguration for .net core without any Microsoft extensions:
var config = Config.GetConfiguration();
var testConfiguration = config.Get<MyTestConfiguration>();
If you need, use the legacy ConfigurationManager too:
var isEnabled = ConfigurationManager.AppSettings["IsEnabled"];
The built-in ConfigurationManager even supports generics:
var isEnabled = ConfigurationManager.AppSettings<bool>["IsEnabled"];
Advanced Usage
See the wiki
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 is compatible. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.8
- Microsoft.Extensions.Configuration.Abstractions (>= 3.1.3)
- TypeSupport (>= 1.0.100)
-
.NETStandard 2.0
- Microsoft.Extensions.Configuration.Abstractions (>= 3.1.3)
- TypeSupport (>= 1.0.100)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.165 | 6,870 | 11/16/2021 |
1.0.164 | 797 | 11/15/2021 |
1.0.161 | 876 | 11/1/2021 |
1.0.160 | 900 | 11/1/2021 |
1.0.159 | 809 | 11/1/2021 |
1.0.157 | 827 | 11/1/2021 |
1.0.155 | 844 | 10/22/2021 |
1.0.152 | 845 | 10/20/2021 |
1.0.149 | 833 | 10/7/2021 |
1.0.147 | 876 | 10/7/2021 |
1.0.145 | 3,106 | 7/29/2021 |
1.0.136 | 865 | 2/16/2021 |
1.0.135 | 890 | 2/4/2021 |
1.0.134 | 917 | 2/4/2021 |
1.0.130 | 907 | 2/4/2021 |
1.0.122 | 7,697 | 2/4/2021 |
1.0.114 | 4,574 | 7/10/2020 |
1.0.113 | 1,081 | 7/10/2020 |
1.0.112 | 2,527 | 7/10/2020 |
1.0.110 | 1,107 | 7/10/2020 |
1.0.109 | 1,070 | 7/9/2020 |
1.0.108 | 1,050 | 7/9/2020 |
1.0.105 | 1,110 | 6/22/2020 |
1.0.103 | 1,135 | 6/9/2020 |
1.0.102 | 1,096 | 6/2/2020 |
1.0.101 | 1,056 | 6/2/2020 |
1.0.99 | 1,064 | 5/30/2020 |
1.0.98 | 1,072 | 5/30/2020 |
1.0.97 | 1,065 | 5/30/2020 |
1.0.95 | 1,107 | 5/29/2020 |
1.0.91 | 1,041 | 5/7/2020 |
1.0.90 | 1,035 | 5/5/2020 |
1.0.78 | 1,817 | 5/2/2020 |
1.0.77 | 1,117 | 5/1/2020 |
1.0.76 | 1,047 | 5/1/2020 |
1.0.75 | 1,050 | 5/1/2020 |
1.0.72 | 1,022 | 5/1/2020 |
1.0.70 | 1,030 | 4/30/2020 |
1.0.69 | 1,069 | 4/24/2020 |
1.0.68 | 1,023 | 4/24/2020 |
1.0.67 | 1,006 | 4/24/2020 |
1.0.66 | 1,070 | 4/23/2020 |
1.0.65 | 1,034 | 4/23/2020 |
1.0.64 | 1,050 | 4/20/2020 |
1.0.62 | 1,006 | 4/20/2020 |
1.0.60 | 1,010 | 4/20/2020 |
1.0.58 | 999 | 4/18/2020 |
1.0.48 | 1,164 | 4/14/2020 |
1.0.47 | 984 | 4/14/2020 |
1.0.44 | 1,005 | 4/14/2020 |
1.0.42 | 998 | 4/14/2020 |
1.0.41 | 1,048 | 4/14/2020 |
1.0.40 | 1,030 | 4/14/2020 |
1.0.39 | 1,044 | 4/14/2020 |
1.0.38 | 942 | 4/14/2020 |
1.0.37 | 995 | 4/14/2020 |
1.0.36 | 1,057 | 4/13/2020 |
1.0.35 | 1,080 | 4/10/2020 |
1.0.29 | 1,080 | 4/9/2020 |
1.0.28 | 1,121 | 4/8/2020 |
1.0.25 | 1,148 | 4/8/2020 |
1.0.16 | 1,065 | 4/7/2020 |
1.0.9 | 1,064 | 4/4/2020 |
1.0.0 | 1,104 | 4/3/2020 |
A .net configuration library to make configuration of multi-target applications easier