Browse Source
Merge pull request #13660 from abpframework/liangshiwei/patch
Update console template
pull/13661/head
maliming
4 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,10 +36,9 @@ public class Program |
|
|
|
services.AddApplicationAsync<MyProjectNameModule>(options => |
|
|
|
{ |
|
|
|
options.Services.ReplaceConfiguration(services.GetConfiguration()); |
|
|
|
options.UseAutofac(); |
|
|
|
options.Services.AddLogging(loggingBuilder => loggingBuilder.AddSerilog()); |
|
|
|
}); |
|
|
|
}).UseConsoleLifetime(); |
|
|
|
}).UseAutofac().UseConsoleLifetime(); |
|
|
|
|
|
|
|
var host = builder.Build(); |
|
|
|
await host.Services.GetRequiredService<IAbpApplicationWithExternalServiceProvider>().InitializeAsync(host.Services); |
|
|
|
|