Skip to content

Commit

Permalink
Upgrade to ABP 5.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
gdlcf88 committed Feb 9, 2022
1 parent edc8272 commit 5958cf2
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- master
- main
jobs:
publish:
runs-on: ubuntu-latest
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>

<AbpVersion>5.0.1</AbpVersion>
<AbpVersion>5.1.3</AbpVersion>

</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion common.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>1.6.0</Version>
<Version>1.6.1</Version>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>EasyAbp Team</Authors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ public DbMigratorHostedService(IHostApplicationLifetime hostApplicationLifetime)

public async Task StartAsync(CancellationToken cancellationToken)
{
using (var application = AbpApplicationFactory.Create<MyAbpAppDbMigratorModule>(options =>
using (var application = await AbpApplicationFactory.CreateAsync<MyAbpAppDbMigratorModule>(options =>
{
options.UseAutofac();
options.Services.AddLogging(c => c.AddSerilog());
}))
{
application.Initialize();
await application.InitializeAsync();

await application
.ServiceProvider
.GetRequiredService<MyAbpAppDbMigrationService>()
.MigrateAsync();

application.Shutdown();
await application.ShutdownAsync();

_hostApplicationLifetime.StopApplication();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ public class ConsoleTestAppHostedService : IHostedService
{
public async Task StartAsync(CancellationToken cancellationToken)
{
using (var application = AbpApplicationFactory.Create<MyAbpAppConsoleApiClientModule>())
using (var application = await AbpApplicationFactory.CreateAsync<MyAbpAppConsoleApiClientModule>())
{
application.Initialize();
await application.InitializeAsync();

var demo = application.ServiceProvider.GetRequiredService<ClientDemoService>();
await demo.RunAsync();

application.Shutdown();
await application.ShutdownAsync();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public override void PreConfigureServices(ServiceConfigurationContext context)
{
context.Services.PreConfigure<IMvcBuilder>(builder =>
{
builder.PartManager.ApplicationParts.Add(new AssemblyPart(typeof(MyAbpAppWebModule).Assembly));
builder.PartManager.ApplicationParts.Add(new CompiledRazorAssemblyPart(typeof(MyAbpAppWebModule).Assembly));
});
}

Expand Down

0 comments on commit 5958cf2

Please sign in to comment.