Browse Source

Merge pull request #13660 from abpframework/liangshiwei/patch

Update console template
pull/13661/head
maliming 4 years ago
committed by GitHub
parent
commit
c9748060bd
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,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);

Loading…
Cancel
Save