EnvKey's Nuget .NET library. Protect API keys and credentials. Keep configuration in sync.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Lib
NuGet
TestWinClient
Tests
.editorconfig
.gitattributes
.gitignore
EnvKeyNuget.sln
LICENCE.txt
NuGet.Config
README.md

README.md

EnvKey for .net Framework

NuGet Package
EnvKey Releases

The current envkey nuget package supports only windows on x64. If you wish to use it on linux or mac please open an issue to show your demand.

Usage

var envKey = new EnvKeyConfig();
var success = envKey.Load();

Stripe.ApiKey = Environment.GetEnvironmentVariable("STRIPE_SECRET_KEY");

Building

Preface

Versions of envkey should go hand in hand with the nuget package version to keep things tidy.
That means that a envkey version 1.2.0 should be downlaoded (via download_envkey.bat) and a package should be generated with version 1.2.0 (via build.bat and pack.bat).
To release library changes that refer to a certain version of envkey, the package should get a build-version extension, eg. 1.2.0.3.

Requirements

To keep things simple you need to install Visual Studio 2017.

Run NuGet\download_envkey.bat. This will download the envkey executable. You'll asked for a version number of envkey.

Build

Run NuGet\build.bat. This will restore all packages and creates a clean release build.

Run Tests

Run NuGet\runtests.bat "YOUR_KEY". This will execute all the test console applications in various .net configurations.
Be aware that the tests use the nuget packages to be sure that they're working.

To ease the process of testing, the NuGet folder is marked as nuget source folder so you can create a nuget package (via pack.bat) and update the packages via VisualStudio using the Local EnvKey Nuget Folder source.

Nuget Publish

run NuGet\pack.bat to create a package. You'll be asked to provide a version number.
"1.0.2" will create a package with the version 1.0.2
"1.2.0-??" where "??" can be everything from a name to other version numers to mark the package as prerelease.

Run NuGet\push.bat to upload the package to nuget. You'll be asked to provide an api key to identify yourself als owner of the package.
Please refere to the documentation how to obtain an api key.