Browse Source

Merge pull request #17692 from abpframework/liangshiwei/consoletemplate

Improve console template
pull/17702/head
maliming 3 years ago
committed by GitHub
parent
commit
73f35c406f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  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