Any-Config 1.0.0

There is a newer version of this package available.
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
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Any-Config" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Any-Config --version 1.0.0
#r "nuget: Any-Config, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 5,672 11/16/2021
1.0.164 767 11/15/2021
1.0.161 832 11/1/2021
1.0.160 850 11/1/2021
1.0.159 780 11/1/2021
1.0.157 796 11/1/2021
1.0.155 812 10/22/2021
1.0.152 814 10/20/2021
1.0.149 795 10/7/2021
1.0.147 841 10/7/2021
1.0.145 3,060 7/29/2021
1.0.136 834 2/16/2021
1.0.135 858 2/4/2021
1.0.134 869 2/4/2021
1.0.130 875 2/4/2021
1.0.122 7,659 2/4/2021
1.0.114 4,523 7/10/2020
1.0.113 1,043 7/10/2020
1.0.112 2,460 7/10/2020
1.0.110 1,055 7/10/2020
1.0.109 1,021 7/9/2020
1.0.108 1,015 7/9/2020
1.0.105 1,062 6/22/2020
1.0.103 1,085 6/9/2020
1.0.102 1,046 6/2/2020
1.0.101 1,010 6/2/2020
1.0.99 1,034 5/30/2020
1.0.98 1,037 5/30/2020
1.0.97 1,033 5/30/2020
1.0.95 1,061 5/29/2020
1.0.91 1,001 5/7/2020
1.0.90 1,007 5/5/2020
1.0.78 1,784 5/2/2020
1.0.77 1,088 5/1/2020
1.0.76 1,017 5/1/2020
1.0.75 1,020 5/1/2020
1.0.72 994 5/1/2020
1.0.70 1,001 4/30/2020
1.0.69 1,040 4/24/2020
1.0.68 990 4/24/2020
1.0.67 974 4/24/2020
1.0.66 1,038 4/23/2020
1.0.65 1,006 4/23/2020
1.0.64 1,015 4/20/2020
1.0.62 973 4/20/2020
1.0.60 976 4/20/2020
1.0.58 965 4/18/2020
1.0.48 1,135 4/14/2020
1.0.47 953 4/14/2020
1.0.44 974 4/14/2020
1.0.42 970 4/14/2020
1.0.41 1,018 4/14/2020
1.0.40 999 4/14/2020
1.0.39 1,017 4/14/2020
1.0.38 909 4/14/2020
1.0.37 966 4/14/2020
1.0.36 1,021 4/13/2020
1.0.35 1,049 4/10/2020
1.0.29 1,053 4/9/2020
1.0.28 1,091 4/8/2020
1.0.25 1,117 4/8/2020
1.0.16 1,033 4/7/2020
1.0.9 1,032 4/4/2020
1.0.0 1,073 4/3/2020

A .net configuration library to make configuration of multi-target applications easier