fix(project): set appsettings.json as optional in Program.cs
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
|
<AssemblyName>fiscaloscli</AssemblyName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
await Host.CreateDefaultBuilder(args)
|
await Host.CreateDefaultBuilder(args)
|
||||||
.ConfigureAppConfiguration(
|
.ConfigureAppConfiguration(
|
||||||
static c => c.SetBasePath(AppContext.BaseDirectory)
|
static c => c.SetBasePath(AppContext.BaseDirectory)
|
||||||
.AddJsonFile("appsettings.json")
|
.AddJsonFile("appsettings.json", optional: true)
|
||||||
.AddEnvironmentVariables()
|
.AddEnvironmentVariables()
|
||||||
)
|
)
|
||||||
.ConfigureLogging(static c => c.ClearProviders())
|
.ConfigureLogging(static c => c.ClearProviders())
|
||||||
|
|||||||
Reference in New Issue
Block a user