diff --git a/templates/console/src/MyCompanyName.MyProjectName/Program.cs b/templates/console/src/MyCompanyName.MyProjectName/Program.cs index 9ed46f9fae..92f3bf49a1 100644 --- a/templates/console/src/MyCompanyName.MyProjectName/Program.cs +++ b/templates/console/src/MyCompanyName.MyProjectName/Program.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -38,7 +38,7 @@ public class Program options.Services.ReplaceConfiguration(services.GetConfiguration()); options.Services.AddLogging(loggingBuilder => loggingBuilder.AddSerilog()); }); - }).UseAutofac().UseConsoleLifetime(); + }).AddAppSettingsSecretsJson().UseAutofac().UseConsoleLifetime(); var host = builder.Build(); await host.Services.GetRequiredService().InitializeAsync(host.Services); @@ -62,4 +62,4 @@ public class Program Log.CloseAndFlush(); } } -} \ No newline at end of file +}