Skip to content
Write your .NET configuration files in C#
Branch: dev
Clone or download
Latest commit 9e3389b Oct 2, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
src updated to Roslyn 2.4.0 Nov 3, 2017
tests upgrade xunit and xbehave to 2.4.0 Aug 2, 2018
.gitattributes Create .gitattributes Jun 15, 2013
.gitignore fix build Nov 4, 2017
.mailmap docs: add mailmap Apr 15, 2016 removed stylecop from readme Apr 24, 2017
build.cmd fix build Nov 4, 2017
build.csx upgrade SimpleExec to 3.0.0 Sep 20, 2018


Write your .NET configuration files in C# 😎.

Fed up with XML soup? Frustrated that app settings can only be strings? Want to do more in your configuration file than just define app settings? Then ConfigR is for you!

Get it at NuGet.

Powered by Roslyn.

Source Browser


  • Dev AppVeyor branch
  • Master AppVeyor branch


Checkout the quickstart to get an idea of the basics.

ConfigR does plenty more! Features include the ability to specify the path of your configuration file(s), multiple cascading configuration files and custom configurators. Checkout the samples for more info.

TIP: you can write any C# you like in your 'configuration file' 😉. The Roslyn #load and #r features are both supported for loading scripts and referencing assemblies.


Releases will be pushed regularly to NuGet.

To build manually, clone or fork this repository and see 'How to build'.

Can I help to improve it and/or fix bugs?

Absolutely! Please feel free to raise issues, fork the source code, send pull requests, etc.

No pull request is too small. Even whitespace fixes are appreciated. Before you contribute anything make sure you read

How to build

Navigate to your clone root folder and execute build.cmd. The prerequisite you need is MSBuild 15, which is also included in Visual Studio 2017.

build.cmd executes the default build targets which include compilation, test execution and packaging. After the build has completed, the build artifacts will be located in artifacts/output/.

You can also build the solution using Visual Studio 2017 or later. At the time of writing the build is only confirmed to work on Windows using the Microsoft .NET framework 4.6+.


  • View the full list of build targets:

    build.cmd -T

  • Run a specific target:

    build.cmd build

  • Run multiple targets:

    build.cmd build pack

  • View the full list of options:

    build.cmd -?

What do the version numbers mean?

ConfigR uses Semantic Versioning.

You can’t perform that action at this time.