Dotnet Env Versions Save

A .NET library to load environment variables from .env files

v1.3.0

4 years ago

Load options are now an object that is passed in, rather than a list of named arguments.

Also added 2 additional load options:

  • parseVariables -- parse env vars in other env vars inside .env file
  • requireEnvFile -- true if app should fail if no .env file present, false if it should continue running without one

NOTE: requireEnvFile should basically always be false because in production you should not be using a .env file!! It defaults to true for backwards compatibility for now, but someday perhaps we will change this.

Also, Env. DEFAULT_ENVFILENAME is now publicly accessible for applications to reference it if desired.

1.2.0

6 years ago
  • Now supports back to .NET Standard 1.3 / .NET Framework 4.6 ( https://github.com/dotnet/standard/blob/master/docs/versions.md )

  • Flag arguments to enable:

    • whitespace trimming
    • allowing hashes in values
    • unescaping of quoted values
    • overwrite (clobber) existing env vars
  • Uses OS specific rules for env var clobbering (Windows is case insensitive, Linux is case sensitive)

  • Some new helper methods for getting env var values as bool, int or double.

  • Loading env vars from a Stream

v1.1.0

6 years ago

Features and Enhancements

  • Handles presence of = in value in env file

E.g.

CONNECTION=user=test;password=secret

Thanks

@lazytesting

v1.0.0

7 years ago