Starts in:
1 DAY
23 HRS
57 MIN
51 SEC
Starts in:
1 D
23 H
57 M
51 S

ABP Version 7.4 Migration Guide

This document is a guide for upgrading ABP v7.3 solutions to ABP v7.4. There are a few changes in this version that may affect your applications, please read it carefully and apply the necessary changes to your application.

Open-Source (Framework)

If you are using one of the open-source startup templates, then you can check the following sections to apply the related breaking changes:

Bumped the Microsoft.Extensions.FileProviders.Embedded Package Version To v7.0.10

In this version, the Microsoft.Extensions.FileProviders.Embedded (and other Microsoft.* packages) upgraded to the latest version, which is v7.0.10. Therefore, in your solution, you should update the Microsoft.Extensions.FileProviders.Embedded package (and other Microsoft.* packages) version to v7.0.10. This package typically would be in your Domain.Shared project and other projects that have embedded resource(s). So, search this package through your solution and update it accordingly.

You can check this issue to see the updated package versions.

Renamed the AddGlobalFilters<> method as FilterQueryable<> in IMongoDbRepositoryFilterer

ABP provides services to automatically filter data on querying from a database. Prior to this version, creating a new class that derives from the MongoDbRepositoryFilterer and overriding its AddGlobalFilters method was needed for implementing a data filter for MongoDB.

In this version, the AddGlobalFilters<> method is renamed as FilterQueryable<>. Therefore, you need to update the method name if you have used data filtering for MongoDB, in your application.

Exposing Integration Services

Integration Services are now not being exposed by default. In a monolith application, integration services don't need to be exposed outside since the modules would probably be in-process communication with each other. Therefore, they don't need to be exposed for most of the time.

If you build a microservice solution or you need to access an integration service via a network call from any other application, you will probably need to expose the integration services so the other applications can consume them.

To expose integration services and controllers, you can configure the AbpAspNetCoreMvcOptions and set the ExposeIntegrationServices property as true in the ConfigureServices method of your module class:

Configure<AbpAspNetCoreMvcOptions>(options =>
{
    options.ExposeIntegrationServices = true;
});

LocalizationResource property removed from the TemplateDefinition class

In this version, the LocalizationResource property was removed from the TemplateDefinition class and instead, the LocalizationResourceName property has been added.

-    public Type LocalizationResource { get; set; }
+    public string LocalizationResourceName { get; set; }

Changed the method signature for ICorrelationIdProvider.Get()

Prior to this version, the ICorrelationIdProvider.Get() method used to return a non nullable string that represented a correlationId (a unique key that is used in distributed applications to trace requests across multiple services/operations). In this version, this method may return null if it hasn't been generated by AbpCorrelationIdMiddleware before.

public interface ICorrelationIdProvider
{
    
-    [NotNull] string Get();
+    string? Get();

    //other methods

}

Therefore, if you've used this method in your application, you might want to make a null check and update the method signature where it's used.

See #16795 for more information.

Dynamic Setting Store - Setting Management Module

In this version, ABP introduces Dynamic Setting Store, which is an important feature that allows us to collect and get all setting definitions from a single point. This feature requires some actions that need to be taken care of as the following:

  • You need to create a new migration and apply it to your database because a new database table has been added.
  • ISettingDefinitionManager's sync methods have been removed and instead, asynchronous versions of the existing methods have been added.
public interface ISettingDefinitionManager
{
-  SettingDefinition Get([NotNull] string name);
+  Task<SettingDefinition> GetAsync([NotNull] string name);

-  IReadOnlyList<SettingDefinition> GetAll();
+  Task<IReadOnlyList<SettingDefinition>> GetAllAsync();

-   SettingDefinition? GetOrNull(string name);
+   Task<SettingDefinition?> GetOrNullAsync([NotNull] string name);
}

IdentityUserIntegrationService - Identity Module

In this version, ABP introduces the IdentityUserIntegrationService, which is designed to get the current user's information, such as his/her role names within a non-authorized integration service.

For more information, see the related PR: #16962

This is a breaking change for microservice solutions because of the following two reasons and it should be considered:

  • IdentityUserIntegrationService provides non-authorized services. This is not breaking the application but should be taken care of. Since, everyone can use the service to retrieve some information for a certain user (for example, the role names of a user).
  • Secondly, since integration services are not exposed by default anymore as explained in the Exposing Integration Services section above, you should explicitly enable exposing integration services. Otherwise, the operation will fail and you'll get a 404 error from the identity microservice.

To expose integration services and controllers, you can configure the AbpAspNetCoreMvcOptions and set the ExposeIntegrationServices property as true in the ConfigureServices method of your module class:

Configure<AbpAspNetCoreMvcOptions>(options =>
{
    options.ExposeIntegrationServices = true;
});

Blazor UI

If you use Blazor WASM or Blazor Server UI, you should follow this section.

Bumped the Blazorise dependencies to 1.3.1

In this version, the Blazorise dependencies are upgraded to the 1.3.1 version. you should upgrade Blazorise packages to 1.3.1 in your Blazor.csproj file. The following packages are included in the templates by default:

  • Blazorise.Bootstrap5
  • Blazorise.Icons.FontAwesome
  • Blazorise.Components

If your project depends on more blazorise packages, then you should upgrade all of them. You should execute dotnet build & abp bundle commands in the Blazor project if you are using the Blazor WebAssembly.

Bumped the Microsoft.AspNetCore.Components.* dependency to 7.0.10

In this version, the Microsoft.AspNetCore.Components.* dependencies are upgraded to the 7.0.10 version. Therefore, you should upgrade the Microsoft.AspNetCore.Components.Web and Microsoft.AspNetCore.Components.WebAssembly packages to 7.0.10 in your Blazor.csproj file.

Angular UI

We would like to inform you that ABP version 7.4 uses Angular version 16. Please migrate your applications to Angular 16. Update angular

PRO

Please check the Open-Source (Framework) section before reading this section. The listed topics might affect your application and you might need to take care of them.

If you are a paid-license owner and using the ABP's paid version, then please follow the following sections to get informed about the breaking changes and apply the necessary ones:

Angular UI

If you are using the Angular UI, you should follow this section:

GdprConfigModule options model has changed

GdprConfigModule{
- static forRoot(options?: ConfigModuleOptions): ModuleWithProviders<GdprConfigModule> {
+ static forRoot(options?: AbpCookieConsentOptions): ModuleWithProviders<GdprConfigModule> {
}
export interface AbpCookieConsentOptions {
  isEnabled?: boolean;
  cookiePolicyUrl?: string;
  privacyPolicyUrl?: string;
  expireDate?: Date;
}

so you should change your app.module.ts imports as below

- GdprConfigModule.forRoot({
-   cookieConsent: {
-     privacyPolicyUrl: 'gdpr-cookie-consent/privacy',
-     cookiePolicyUrl: 'gdpr-cookie-consent/cookie',
-   },
- })

+ GdprConfigModule.forRoot({
+   privacyPolicyUrl: 'gdpr-cookie-consent/privacy',
+   cookiePolicyUrl: 'gdpr-cookie-consent/cookie',
+ }) 

Contributors


Last updated: July 31, 2024 Edit this page on GitHub

Was this page helpful?

Please make a selection.

To help us improve, please share your reason for the negative feedback in the field below.

Please enter a note.

Thank you for your valuable feedback!

Please note that although we cannot respond to feedback, our team will use your comments to improve the experience.

In this document
Community Talks

What’s New with .NET 9 & ABP 9?

21 Nov, 17:00
Online
Watch the Event
Mastering ABP Framework Book
Mastering ABP Framework

This book will help you gain a complete understanding of the framework and modern web application development techniques.

Learn More