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
<PackageReference Include="DotEnv.Core.Props" Version="1.0.1" />
paket add DotEnv.Core.Props --version 1.0.1
#r "nuget: DotEnv.Core.Props, 1.0.1"
// 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.
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.
- fix: Added .props extension to the build/DotEnv.Core.Props file.