From 5958cf2b1c8e22c07fa3a2bf22209f1418312355 Mon Sep 17 00:00:00 2001 From: gdlcf88 Date: Wed, 9 Feb 2022 19:14:21 +0800 Subject: [PATCH] Upgrade to ABP 5.1.3 --- .github/workflows/publish-docs.yml | 3 ++- Directory.Build.props | 2 +- common.props | 2 +- .../src/MyAbpApp.DbMigrator/DbMigratorHostedService.cs | 6 +++--- .../ConsoleTestAppHostedService.cs | 6 +++--- .../test/MyAbpApp.Web.Tests/MyAbpAppWebTestModule.cs | 2 +- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 85b0cc3..ae496fc 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -3,6 +3,7 @@ on: push: branches: - master + - main jobs: publish: runs-on: ubuntu-latest @@ -18,7 +19,7 @@ jobs: with: find: \]\((/docs/) replace: "](/modules/${{ github.event.repository.name }}/" - include: docs/ + include: docs/**.md - name: Pull repo and change files id: change diff --git a/Directory.Build.props b/Directory.Build.props index 62a6fb3..a4389b9 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - 5.0.1 + 5.1.3 \ No newline at end of file diff --git a/common.props b/common.props index 74a1ad1..93c6b97 100644 --- a/common.props +++ b/common.props @@ -1,7 +1,7 @@ latest - 1.6.0 + 1.6.1 $(NoWarn);CS1591 true EasyAbp Team diff --git a/sample/MyAbpApp/src/MyAbpApp.DbMigrator/DbMigratorHostedService.cs b/sample/MyAbpApp/src/MyAbpApp.DbMigrator/DbMigratorHostedService.cs index 244ad64..fd049b5 100644 --- a/sample/MyAbpApp/src/MyAbpApp.DbMigrator/DbMigratorHostedService.cs +++ b/sample/MyAbpApp/src/MyAbpApp.DbMigrator/DbMigratorHostedService.cs @@ -19,20 +19,20 @@ public DbMigratorHostedService(IHostApplicationLifetime hostApplicationLifetime) public async Task StartAsync(CancellationToken cancellationToken) { - using (var application = AbpApplicationFactory.Create(options => + using (var application = await AbpApplicationFactory.CreateAsync(options => { options.UseAutofac(); options.Services.AddLogging(c => c.AddSerilog()); })) { - application.Initialize(); + await application.InitializeAsync(); await application .ServiceProvider .GetRequiredService() .MigrateAsync(); - application.Shutdown(); + await application.ShutdownAsync(); _hostApplicationLifetime.StopApplication(); } diff --git a/sample/MyAbpApp/test/MyAbpApp.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs b/sample/MyAbpApp/test/MyAbpApp.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs index 655c15a..b715e8b 100644 --- a/sample/MyAbpApp/test/MyAbpApp.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs +++ b/sample/MyAbpApp/test/MyAbpApp.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs @@ -10,14 +10,14 @@ public class ConsoleTestAppHostedService : IHostedService { public async Task StartAsync(CancellationToken cancellationToken) { - using (var application = AbpApplicationFactory.Create()) + using (var application = await AbpApplicationFactory.CreateAsync()) { - application.Initialize(); + await application.InitializeAsync(); var demo = application.ServiceProvider.GetRequiredService(); await demo.RunAsync(); - application.Shutdown(); + await application.ShutdownAsync(); } } diff --git a/sample/MyAbpApp/test/MyAbpApp.Web.Tests/MyAbpAppWebTestModule.cs b/sample/MyAbpApp/test/MyAbpApp.Web.Tests/MyAbpAppWebTestModule.cs index c8b2997..14b340d 100644 --- a/sample/MyAbpApp/test/MyAbpApp.Web.Tests/MyAbpAppWebTestModule.cs +++ b/sample/MyAbpApp/test/MyAbpApp.Web.Tests/MyAbpAppWebTestModule.cs @@ -27,7 +27,7 @@ public override void PreConfigureServices(ServiceConfigurationContext context) { context.Services.PreConfigure(builder => { - builder.PartManager.ApplicationParts.Add(new AssemblyPart(typeof(MyAbpAppWebModule).Assembly)); + builder.PartManager.ApplicationParts.Add(new CompiledRazorAssemblyPart(typeof(MyAbpAppWebModule).Assembly)); }); }