• Stars
    star
    121
  • Rank 293,924 (Top 6 %)
  • Language
    C#
  • License
    MIT License
  • Created over 7 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Microsoft.Configuration.Builders

Configuration Builders

ConfigurationBuilders are a feature of the full .Net Framework that were introduced in .Net 4.7.1. You can read about the concept in this blog post. While the framework for executing configuration injection now exists in .Net as of 4.7.1 with that feature, the framework does not ship with any pre-made builders in box. The goal of this project is for Microsoft to provide a basic set of Configuration Builders that should make it easy for developers to leverage this feature in their apps. They are also intended to address some of the basic dynamic/non-local configuration needs of applications as they move into a container and cloud focused environment.

The set of builders produced here are styled as "Key/Value Config Builders." The architecture of ConfigurationBuilder in the framework is actually quite flexible and can be leveraged to handle a great number of unique situations. To keep things as easy and as broadly applicable as possible though, this project focuses on simple key/value scenarios.

For more information about Configuration Builders and the features and builders in this project in particular, please refer to the docs linked here:

V3 Updates:

  • ⚠️ Breaking Change - Expand mode is gone. It has been replaced by Token mode.
  • Utils.MapPath - This was somewhat broken in ASP.Net scenarios previously. It should now reliably go against Server.MapPath() in ASP.Net scenarios. It has also been updated to fall back against the directory of the config file being processed when resolving the app root in the case of a Configuration object being created by ConfigurationManager.OpenConfiguration* API's rather than being part of a fully-initialized runtime configuration stack.
  • Json use has migrated to use System.Text.Json instead of Newtonsoft.Json.
  • The Azure Config Builders have been updated to require a newer minimum version of Azure.Identity by default which allows for more methods of connecting to Azure, such as User-Assigned Managed Identity, or Client Certificate-based via environment variables. Also a pair of overloads (GetCredential and GetSecretClientOptions/GetConfigurationClientOptions) have been added for users who need something more than DefaultAzureCredential with default client options can provide.
  • Added RecursionGuard to help detect and prevent situations where a ConfigurationBuilder accessing values from a ConfigurationSection other than the one which it is currently processing could result in stack overflow.
  • 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.
  • ConnectionStringsSectionHandler2 - A new section handler for the <connectionStrings> section has been included in the base package. This new handler will allow updating of both the 'connectionString' attribute as well as the 'providerName' attribute. It does require the builders and source of config data to be aware of this new ability though. The default section handler for the <connectionStrings> section has not been updated and remains as it was in previous versions, so apps wishing to take advantage of the new handler will have to wire it up in their config. More details can be found in the SectionHandlers documentation.
  • AzureAppConfiguration nuget package version is revved to match the rest of this suite of builders, rather than being 1 major version behind. (ie, AzureAppConfiguration:3.0 now depends on Base:3.0 rather than AzureAppConfiguration:1.0 depending on Base:2.0)

V2 Updates:

  • Azure App Configuration Support - There is a new builder for drawing values from the new Azure App Configuration service.
  • 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.
  • Lazy Initialization - As part of the work to enable pulling config parameters from appSettings, these key/value configuration builders now support a lazy initialization model. Things that must happen immediately can be left in the existing Initialize(name, config) method, or builders can leverage the new LazyInitialize(name, config) method for things that can happen just before retrieving values. All builders in this project have been updated to be lazy whenever possible.
  • Updateable Keys - Builders can now massage key names before inserting into config. The AzureKeyVaultConfigBuilder has been updated to use this feature to allow embedding 'version' tags in key names instead of applying a single 'version' tag to the builder. (Note: This is seperate from, and performed after prefix stripping.)
  • [[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.)
  • Escaping Expanded Values - It is possible to xml-escape inserted values in ExpandToken(as of V3) mode now using the new escapeExpandedValues attribute.
  • Section Handlers - This feature allows users to develop extensions that will apply key/value config to sections other than appSettings and connectionStrings if desired. Read more about this feature in the Section Handlers segment below.

How to contribute

Information on contributing to this repo is in the Contributing Guide.

Blog Posts

Announcing .NET 4.7.1 Tools for the Cloud
.Net Framework 4.7.1 ASP.NET and Configuration features
Modern Configuration for ASP.NET 4.7.1 with ConfigurationBuilders
Service-to-service authentication to Azure Key Vault using .NET

More Repositories

1

Mvc

[Archived] ASP.NET Core MVC is a model view controller framework for building dynamic web sites with clean separation of concerns, including the merged MVC, Web API, and Web Pages w/ Razor. Project moved to https://github.com/aspnet/AspNetCore
C#
5,617
star
2

JavaScriptServices

[Archived] This repository has been archived
C#
3,035
star
3

KestrelHttpServer

[Archived] A cross platform web server for ASP.NET Core. Project moved to https://github.com/aspnet/AspNetCore
C#
2,629
star
4

SignalR

[Archived] Incredibly simple real-time web for ASP.NET Core. Project moved to https://github.com/aspnet/AspNetCore
C#
2,381
star
5

Identity

[Archived] ASP.NET Core Identity is the membership system for building ASP.NET Core web applications, including membership, login, and user data. Project moved to https://github.com/aspnet/AspNetCore
C#
1,961
star
6

Announcements

Subscribe to this repo to be notified about major changes in ASP.NET Core and Entity Framework Core
1,658
star
7

MusicStore

[Archived] MusicStore test application that uses ASP.NET/EF Core. Project moved to https://github.com/aspnet/AspNetCore
1,298
star
8

Security

[Archived] Middleware for security and authorization of web apps. Project moved to https://github.com/aspnet/AspNetCore
C#
1,270
star
9

AspLabs

Repo for ASP.NET experiments that are not ready for a production release
C#
1,224
star
10

Benchmarks

Benchmarks for ASP.NET Core
C#
1,169
star
11

samples

Samples for ASP.NET Core
983
star
12

AspNetKatana

Microsoft's OWIN implementation, the Katana project
C#
966
star
13

dnx

OBSOLETE - see readme
C++
963
star
14

Razor

[Archived] Parser and code generator for CSHTML files used in view pages for MVC web apps. Project moved to https://github.com/aspnet/AspNetCore
C#
883
star
15

DependencyInjection

[Archived] Contains common DI abstractions that ASP.NET Core and Entity Framework Core use. Project moved to https://github.com/aspnet/Extensions
C#
873
star
16

AspNetWebStack

ASP.NET MVC 5.x, Web API 2.x, and Web Pages 3.x (not ASP.NET Core)
C#
853
star
17

SignalR-samples

Samples for ASP.NET Core SignalR
JavaScript
748
star
18

aspnet-docker

[Archived] ASP.NET Core Docker images for 1.x. Go to https://github.com/dotnet/dotnet-docker for 2.1 and up.
719
star
19

WebHooks

[Archived] Libraries to create and consume web hooks on ASP.NET Core. Project moved to https://github.com/aspnet/AspLabs
C#
627
star
20

Entropy

A chaotic experimental playground for new features and ideas - check here for small and simple samples for individual features.
C#
560
star
21

Hosting

[Archived] Code for hosting and starting up an ASP.NET Core application. Project moved to https://github.com/aspnet/Extensions and https://github.com/aspnet/AspNetCore
C#
552
star
22

Logging

[Archived] Common logging abstractions and a few implementations. Project moved to https://github.com/aspnet/Extensions
C#
506
star
23

Caching

[Archived] Libraries for in-memory caching and distributed caching. Project moved to https://github.com/aspnet/Extensions
C#
480
star
24

LibraryManager

C#
457
star
25

DotNetTools

[Archived] Various .NET command line tools. Project moved to https://github.com/aspnet/AspNetCore
C#
439
star
26

HttpAbstractions

[Archived] HTTP abstractions such as HttpRequest, HttpResponse, and HttpContext, as well as common web utilities. Project moved to https://github.com/aspnet/AspNetCore
C#
382
star
27

WebSockets

[Archived] Implementation of the WebSocket protocol, along with client and server integration components.
C#
357
star
28

Microsoft.Data.Sqlite

[Archived] SQLite implementations of the System.Data.Common interfaces. Project has moved to https://github.com/aspnet/EntityFrameworkCore
C#
347
star
29

AzureSignalR-samples

Code samples for Azure SignalR
JavaScript
327
star
30

Configuration

[Archived] Interfaces and providers for accessing configuration files. Project moved to https://github.com/aspnet/Extensions
C#
327
star
31

live.asp.net

Code for live.asp.net, which hosts the ASP.NET Community Stand-up
C#
289
star
32

Routing

[Archived] Middleware for routing requests to application logic. Project moved to https://github.com/aspnet/AspNetCore
C#
272
star
33

Tooling

Issue tracker and info on Visual Studio tooling for ASP.NET
256
star
34

jquery-validation-unobtrusive

Add-on to jQuery Validation to enable unobtrusive validation options in data-* attributes.
JavaScript
254
star
35

HttpClientFactory

[Archived] Contains an opinionated factory for creating HttpClient instances. Project moved to https://github.com/aspnet/Extensions
C#
252
star
36

AspNetIdentity

ASP.NET Identity for ASP.NET 4.x applications
C#
246
star
37

Diagnostics

[Archived] Diagnostics middleware for reporting info and handling exceptions and errors in ASP.NET Core, and diagnosing Entity Framework Core migrations errors. Project moved to https://github.com/aspnet/AspNetCore
C#
213
star
38

MetaPackages

[Archived] NuGet meta packages. Project moved to https://github.com/aspnet/AspNetCore
C#
211
star
39

Templating

[Archived] ASP.NET Core templates for .NET CLI and Visual Studio. Project moved to https://github.com/aspnet/AspNetCore
C#
205
star
40

Proxy

[Archived] Proxy library for ASP.NET Core. Project moved to https://github.com/aspnet/AspLabs
C#
201
star
41

dnvm

OBSOLETE - see readme
PowerShell
174
star
42

FileSystem

[Archived] Abstraction of file system APIs. Project moved to https://github.com/aspnet/Extensions
C#
171
star
43

BasicMiddleware

[Archived] Basic middleware components for ASP.NET Core. Project moved to https://github.com/aspnet/AspNetCore
C#
169
star
44

BugTracker

OBSOLETE - see readme
JavaScript
158
star
45

Universe

[Archived] Repo for building the entire ASP.NET and Entity Framework stack. Project moved to https://github.com/aspnet/AspNetCore
C#
158
star
46

Localization

[Archived] Localization abstractions and implementations for ASP.NET Core applications. Project moved to https://github.com/aspnet/AspNetCore
C#
157
star
47

Templates

This repo is OBSOLETE - please see the README file for information
C#
151
star
48

Options

[Archived] A framework for accessing and configuring POCO settings. Project moved to https://github.com/aspnet/Extensions
C#
149
star
49

IISIntegration

[Archived] ASP.NET Core IIS integration. Project has moved to https://github.com/aspnet/AspNetCore
C++
148
star
50

jquery-ajax-unobtrusive

[Maintenance mode: only security and critical bug fixes are being worked on] Add-on to jQuery Ajax to enable unobtrusive options in data-* attributes.
JavaScript
144
star
51

SignalR-Client-Cpp

C++ Client for ASP.NET Core SignalR
C++
140
star
52

AspNetWebHooks

Libraries to create and consume web hooks on ASP.NET 4.x (Due to other priorities this project is currently in maintenance mode only. There are no planned releases at this time. No new features are planned and we are only addressing critical issues as required.)
C#
135
star
53

Blazor.Docs

Docs for Blazor
CSS
131
star
54

Blazor-Hackathon

Blazor is now official and is part of the ASP.NET Core Framework. All the work is tracked in the dotnet/aspnetcore repo.
C#
131
star
55

DataProtection

[Archived] Data Protection APIs for protecting and unprotecting data. Project moved to https://github.com/aspnet/AspNetCore
C#
130
star
56

Session

[Archived] Session state middleware for ASP.NET Core. Project moved to https://github.com/aspnet/AspNetCore
C#
126
star
57

DataAccessPerformance

Benchmarks, prototypes and discussions for database access performance investigation
C#
115
star
58

AspNetCoreModule

ASP.NET Core Module for IIS and IIS Express
C#
115
star
59

StaticFiles

[Archived] Middleware for handling requests for file system resources including files and directories. Project moved to https://github.com/aspnet/AspNetCore
C#
114
star
60

HttpSysServer

[Archived] A web server for ASP.NET Core based on the Windows Http Server API. Project moved to https://github.com/aspnet/AspNetCore
C#
106
star
61

JsonPatch

[Archived] JSON PATCH library. Project moved to https://github.com/aspnet/AspNetCore
C#
103
star
62

CORS

[Archived] Implementations of common CORS policy and CORS middleware. Project moved to https://github.com/aspnet/AspNetCore
C#
90
star
63

RoslynCodeDomProvider

Roslyn CodeDOM provider
C#
84
star
64

AuthSamples

[Archived] Samples for ASP.NET Core authentication and authorization. Project moved to https://github.com/aspnet/AspNetCore
C#
83
star
65

Razor.VSCode

[Archived] This repo has been migrated. Please use the https://github.com/aspnet/AspNetCore repo instead.
C#
81
star
66

Antiforgery

[Archived] AntiForgery token feature for ASP.NET Core. Project moved to https://github.com/aspnet/AspNetCore
C#
78
star
67

BuildTools

Infrastructure utilities used in the ASP.NET Core build system. (Obsolete: use https://github.com/dotnet/arcade for all new projects)
C#
73
star
68

ResponseCaching

[Archived] ASP.NET Core middleware for caching responses. Project moved to https://github.com/aspnet/AspNetCore
C#
70
star
69

Testing

[Archived] Testing infrastructure, including support for xUnit.net and StyleCop. Project moved to https://github.com/aspnet/Extensions
66
star
70

SignalR-Client-JS

OBSOLETE - see readme
59
star
71

SignalR-Client-Net

OBSOLETE - see readme
57
star
72

AspNetSessionState

ASP.NET Session State (not for ASP.NET Core)
C#
55
star
73

NerdDinner

Porting NerdDinner to ASP.NET 5
JavaScript
50
star
74

SignalR-Redis

OBSOLETE - see readme
C#
48
star
75

EventNotification

[Archived] Event notification system for broadcasting application state and configuration. Project moved to https://github.com/aspnet/Extensions
C#
45
star
76

SignalR-SqlServer

OBSOLETE - see readme
C#
42
star
77

MvcPrecompilation

[Archived] Tooling that allows compilation of MVC Razor views as part of build and publish. Project moved to https://github.com/aspnet/AspNetCore
C#
42
star
78

KoreBuild

OBSOLETE REPO - see readme
Shell
37
star
79

vsweb-publish

Web publish support for ASP.NET 5 in Visual Studio 2015
PowerShell
33
star
80

homebrew-dnx

OBSOLETE - see readme
Ruby
32
star
81

Coherence

A build that verifies that all the packages form a consistent graph.
C#
30
star
82

AspNetWebFormsDependencyInjection

Dependency injection support for ASP.NET Web Forms 4.x
C#
30
star
83

UserSecrets

Command line tool and configuration provider for managing secrets
28
star
84

HtmlAbstractions

[Archived] HTML abstractions used for building HTML content. Project moved to https://github.com/aspnet/AspNetCore
C#
27
star
85

EntityFramework.Tools

.NET Command Line tools for Entity Framework Core
PowerShell
25
star
86

vsweb-docs

Showcase for Visual Studio web features
JavaScript
24
star
87

AzureIntegration

[Archived] Features that integrate ASP.NET Core with Azure. Project moved to https://github.com/aspnet/AspNetCore
C#
24
star
88

RazorTooling

Razor tooling for Visual Studio 2015
C#
23
star
89

PlatformAbstractions

OBSOLETE - used only for 1.0/1.1 patch builds
23
star
90

SignalR-Client-Java

OBSOLETE - see readme
23
star
91

libuv-build

Libuv build automation for ASP.NET Core
PowerShell
22
star
92

Wave

Cross-platform tools for running perf and stress tests
JavaScript
21
star
93

ServerTests

[Archived] Tests for Helios, WebListener and Kestrel. Project moved to https://github.com/aspnet/AspNetCore
C#
21
star
94

SignalR-ServiceBus

OBSOLETE - see readme
C#
21
star
95

libuv-package

NuGet packages for libuv
PowerShell
19
star
96

AADIntegration

[Archived] UI and library components for integrating ASP.NET Core applications with Azure Active Directory. Project moved to https://github.com/aspnet/AspNetCore
C#
19
star
97

BrowserLink

Browser Link loader for Visual Studio integration
C#
17
star
98

AspNetWebOptimization

ASP.NET Web Optimization for ASP.NET 4.x applications
C#
15
star
99

JitBench

Repo for testing JIT stuff
C#
15
star
100

aspnet-win-docker

Windows Docker image for ASP.NET Core [WIP]
PowerShell
15
star