Browse Source

Update console template

pull/13660/head
liangshiwei 4 years ago
parent
commit
2d09896882
  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