DotEnv.Core.Props 1.0.1

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

// Install DotEnv.Core.Props as a Cake Tool
#tool nuget:?package=DotEnv.Core.Props&version=1.0.1

DotEnv.Core.Props is a file that represents a set of properties that will tell MSBuild to copy the .env files from the project folder to the publish directory.

This .props file excludes the following sample .env files:

  • .env.example
  • example.env
  • .env.sample
  • sample.env
  • .env.template
  • template.env

Installation

Run the following command from the terminal:

dotnet add package DotEnv.Core.Props

How to use it?

The .props file does not need to be used directly, simply run the dotnet publish command and MSBuild will copy the .env files to the publish directory.

Remember that .env files must follow either of these two conventions:

  • .env.{name} (e.g., .env.config).
  • {name}.env (e.g., config.env).

Following these conventions is necessary for MSBuild to know which file to copy to the publish directory.

There are no supported framework assets in this 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
1.0.1 280 6/30/2023
1.0.0 165 6/29/2023

- fix: Added .props extension to the build/DotEnv.Core.Props file.