ConfigMocker 0.2.0

dotnet add package ConfigMocker --version 0.2.0
NuGet\Install-Package ConfigMocker -Version 0.2.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="ConfigMocker" Version="0.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ConfigMocker --version 0.2.0
#r "nuget: ConfigMocker, 0.2.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 ConfigMocker as a Cake Addin
#addin nuget:?package=ConfigMocker&version=0.2.0

// Install ConfigMocker as a Cake Tool
#tool nuget:?package=ConfigMocker&version=0.2.0

Usage
Create a "Web.config" variation with machine name in extension, eg "Web.PC-DEV.config".
Add your machine specific connection strings or app settings to that file, using standard .NET configuration elements.
Call new ConfigMocker.ConfigMocker.Mock(); during app init - it will replace default configuration with machine specific ones in runtime, if alternative config file was found for this machine.
NOTE: "configSource" attribute is also supported. Just create new variation for config file specified in the attribute value. For example, for this line in the "Web.config":

<connectionStrings configSource="App_Config\ConnectionStrings.config" />
create a variation in "App_Config" folder with the name "ConnectionStrings.%PC-NAME%.config".

Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

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
0.2.0 3,414 7/10/2014