Browse Source
Merge pull request #17692 from abpframework/liangshiwei/consoletemplate
Improve console template
pull/17702/head
maliming
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
2 deletions
-
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); |
|
|
|
|