Info
Version: | 2.0.1 |
Author(s): | Jaine.ch |
Last Update: | Thursday, August 12, 2021 |
.NET Fiddle: | Create the first Fiddle |
NuGet Url: | https://www.nuget.org/packages/ConfigMapFileProvider |
Install
Install-Package ConfigMapFileProvider
dotnet add package ConfigMapFileProvider
paket add ConfigMapFileProvider
ConfigMapFileProvider Download (Unzip the "nupkg" after downloading)
Dependencies
.NETStandard 2.0
- Microsoft.Extensions.FileProviders.Abstractions(>= 5.0.0)
- Microsoft.Extensions.FileProviders.Physical(>= 5.0.0)
- Microsoft.Extensions.Primitives(>= 5.0.0)
- Microsoft.Extensions.FileProviders.Abstractions(>= 5.0.0)
- Microsoft.Extensions.FileProviders.Physical(>= 5.0.0)
- Microsoft.Extensions.Primitives(>= 5.0.0)
- Microsoft.Extensions.FileProviders.Abstractions(>= 5.0.0)
- Microsoft.Extensions.FileProviders.Physical(>= 5.0.0)
- Microsoft.Extensions.Primitives(>= 5.0.0)
Usage:
static IHostBuilder CreateHostBuilder(string[] args)
{
return Microsoft.Extensions.Hosting.Host.CreateDefaultBuilder(args)
.ConfigureAppConfiguration((c,b)=>{
b.SetBasePath(Path.Join(AppContext.BaseDirectory,"config"))
.AddJsonFile(ConfigMapFileProvider.FromRelativePath("config"), "appsettings.json");
})
.UseConsoleLifetime()
;
}.