Browse Source

Improve console template

pull/17692/head
liangshiwei 3 years ago
parent
commit
d17059feed
  1. 3
      templates/console/src/MyCompanyName.MyProjectName/Program.cs

3
templates/console/src/MyCompanyName.MyProjectName/Program.cs

@ -36,9 +36,8 @@ public class Program
services.AddApplicationAsync<MyProjectNameModule>(options =>
{
options.Services.ReplaceConfiguration(services.GetConfiguration());
options.Services.AddLogging(loggingBuilder => loggingBuilder.AddSerilog());
});
}).AddAppSettingsSecretsJson().UseAutofac().UseConsoleLifetime();
}).AddAppSettingsSecretsJson().UseSerilog().UseAutofac().UseConsoleLifetime();
var host = builder.Build();
await host.Services.GetRequiredService<IAbpApplicationWithExternalServiceProvider>().InitializeAsync(host.Services);

Loading…
Cancel
Save