Microsoft.Configuration.ConfigurationBuilders.Environment 3.0.0-preview2

The ID prefix of this package has been reserved for one of the owners of this package by Prefix Reserved
.NET Framework 4.7.1
This is a prerelease version of Microsoft.Configuration.ConfigurationBuilders.Environment.
dotnet add package Microsoft.Configuration.ConfigurationBuilders.Environment --version 3.0.0-preview2
NuGet\Install-Package Microsoft.Configuration.ConfigurationBuilders.Environment -Version 3.0.0-preview2
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="Microsoft.Configuration.ConfigurationBuilders.Environment" Version="3.0.0-preview2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Microsoft.Configuration.ConfigurationBuilders.Environment --version 3.0.0-preview2
#r "nuget: Microsoft.Configuration.ConfigurationBuilders.Environment, 3.0.0-preview2"
#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 Microsoft.Configuration.ConfigurationBuilders.Environment as a Cake Addin
#addin nuget:?package=Microsoft.Configuration.ConfigurationBuilders.Environment&version=3.0.0-preview2&prerelease

// Install Microsoft.Configuration.ConfigurationBuilders.Environment as a Cake Tool
#tool nuget:?package=Microsoft.Configuration.ConfigurationBuilders.Environment&version=3.0.0-preview2&prerelease

Environment ConfigBuilder

This package offers the most basic of the config builders. It draws its values from Environment, and it does not have any additional configuration options. More comprehensive documentation exists at the MicrosoftConfigBuilders project.

The basic usage of this builder is given below. Parameters inside []s are optional. Parameters grouped in ()s are mutually exclusive. Parameters beginning with @ allow appSettings substitution. The first line of parameters are common to all builders and optional. Their meaning, usage, and defaults are documented here. They are grouped on one line for brevity. When a builder uses a different default value than the project default, the differing value is also listed. Builder-specific settings are listed on each line thereafter followed by a brief explanation.

<add name="Environment"
    type="Microsoft.Configuration.ConfigurationBuilders.EnvironmentConfigBuilder, Microsoft.Configuration.ConfigurationBuilders.Environment" />

V3 Updates:

A more complete list of updates lives here. These are the ones most relevant to this builder:

  • ⚠️ Breaking Change - Expand mode is gone. It has been replaced by Token mode.
  • optional attribute is obsolete ⇒ enabled attribute which provides more versatility. (The optional attribute is still parsed and recognized in the absence of the newer enabled attribute, but builders should migrate to use the new attribute name when possible. Installation scripts should try to handle this automatically.)
  • Character Mapping - Some config builders have had an internal mapping of characters that might exist in keys in the config file but are illegal in keys at the source. As more scenarios come to light and individual prefrences are not always unanimous, V3 instead adds the charMap attribute to allow this character mapping to work with all KeyValueConfigBuilders and to be handled in an easily configurable manner.

V2 Updates:

A more complete list of updates lives here. These are the ones most relevant to this builder:

  • ConfigBuilder Parameters from AppSettings - This has been one of the most asked for features of these config builders. With V2, it is now possible to read initialization parameters for config builders from appSettings. Read more about it here.
  • [[Obsolete]] This has been superceded by the enabled tag. (Base Optional Tag - The optional tag that some of the builders in this project employed in V1 has been moved into the base class and is now available on all key/value config builders.)
Product Versions
.NET Framework net471 net472 net48 net481
Compatible target framework(s)
Additional computed target framework(s)
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
3.0.0-preview2 379 1/18/2023
3.0.0-preview1 5,046 4/1/2022
2.0.0 1,387,452 2/22/2020
2.0.0-rc 6,541 1/10/2020
2.0.0-beta 47,539 2/26/2019
1.0.2 1,986,288 7/9/2018
1.0.1 17,593 5/25/2018
1.0.0-preview3 963 5/4/2018
1.0.0-preview2 2,119 3/10/2018
1.0.0-preview 2,055 11/17/2017