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.
<PackageVersion Include="DotEnv.Core.Props" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="DotEnv.Core.Props" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version 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.
#:package DotEnv.Core.Props@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DotEnv.Core.Props&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=DotEnv.Core.Props&version=1.0.1
                    
Install as a Cake Tool

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 (1)

Showing the top 1 popular GitHub repositories that depend on DotEnv.Core.Props:

Repository Stars
DevD4v3/dotenv.core
A library for reading and parsing .env files
Version Downloads Last Updated
1.0.1 1,209 6/30/2023
1.0.0 661 6/29/2023

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