Open Closed

Upgrade from 5.3.x to 7.2.x #5399


User avatar
0
darutter created

I have an application (MVC, non-tiered, EF database) that was created using Abp.io version 5.3.2 and .NETCore 6.0. The project includes a MAUI mobile app. Because of several issues with the MAUI app I have to update the .NETCore to 7.0 to get it to build properly for release. I also updated the ABP packages as follows:

<PackageReference Include="Volo.Abp.Autofac" Version="7.2.3" />
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="7.2.3" />
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="7.2.3" />
<PackageReference Include="Volo.Abp.Swashbuckle" Version="7.2.3" />
<PackageReference Include="Volo.Abp.FeatureManagement.Web" Version="7.2.3" />
<PackageReference Include="Volo.Abp.Account.Pro.Public.Web.IdentityServer" Version="5.3.0" />
<PackageReference Include="Volo.Abp.Account.Pro.Admin.Web" Version="5.3.0" />
<PackageReference Include="Volo.Abp.AuditLogging.Web" Version="5.3.0" />
<PackageReference Include="Volo.Abp.Identity.Pro.Web" Version="5.3.0" />
<PackageReference Include="Volo.Abp.LeptonTheme.Management.Web" Version="5.3.0" />
<PackageReference Include="Volo.Abp.IdentityServer.Web" Version="5.3.0" />
<PackageReference Include="Volo.Abp.LanguageManagement.Web" Version="5.3.0" />
<PackageReference Include="Volo.Saas.Host.Web" Version="5.3.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton" Version="5.3.0" />
<PackageReference Include="Volo.Abp.TextTemplateManagement.Web" Version="5.3.0" />

In doing so, I cannot run my web app successfully. On startup I get the following error:

Method 'GetListAsync' in type 'Volo.Abp.Identity.EntityFrameworkCore.EfCoreIdentityUserRepository' from assembly 'Volo.Abp.Identity.EntityFrameworkCore, Version=5.3.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.

I am guessing there are some framework changes that are not properly updated but I don't know where to look/start. Please provide guidance.


7 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You need to upgrade all abp packages to the same version.

  • User Avatar
    0
    darutter created

    The Pro packages all indicate that the versions listed are the latest stable versions and there are no upgrades to them. Please advise.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can change the packages to 7.2.3 and run dotnet restore dotnet build command.

  • User Avatar
    0
    darutter created

    Generates errors on build:

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    public DbSet<IdentityUserDelegation> UserDelegations { get; }

    /* Add DbSet properties for your Aggregate Roots / Entities here. */
    
    #region Entities from the modules
    
    /* Notice: We only implemented IIdentityProDbContext and ISaasDbContext
     * and replaced them for this DbContext. This allows you to perform JOIN
     * queries for the entities of these modules over the repositories easily. You
     * typically don't need that for other modules. But, if you need, you can
     * implement the DbContext interface of the needed module and use ReplaceDbContext
     * attribute just like IIdentityProDbContext and ISaasDbContext.
     *
     * More info: Replacing a DbContext of a module ensures that the related module
     * uses this DbContext on runtime. Otherwise, it will use its own DbContext class.
     */
    
    // Identity
    public DbSet<IdentityUser> Users { get; set; }
    public DbSet<IdentityRole> Roles { get; set; }
    public DbSet<IdentityClaimType> ClaimTypes { get; set; }
    public DbSet<OrganizationUnit> OrganizationUnits { get; set; }
    public DbSet<IdentitySecurityLog> SecurityLogs { get; set; }
    public DbSet<IdentityLinkUser> LinkUsers { get; set; }
    public DbSet<IdentityUserDelegation> UserDelegations { get; }
    
    // SaaS
    public DbSet<Tenant> Tenants { get; set; }
    public DbSet<Edition> Editions { get; set; }
    public DbSet<TenantConnectionString> TenantConnectionStrings { get; set; }
    
    #endregion
    
  • User Avatar
    0
    darutter created

    2023-07-14 09:45:20.670 -05:00 [ERR] An exception occurred while iterating over the results of a query for context type 'Volo.Abp.LanguageManagement.EntityFrameworkCore.LanguageManagementDbContext'. Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid object name 'AbpLocalizationResources'. at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__208_0(Task1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)

    System.MissingMethodException: Method not found: 'System.Collections.Generic.IList`1<Microsoft.EntityFrameworkCore.Metadata.Conventions.IModelFinalizingConvention> Microsoft.EntityFrameworkCore.Metadata.Conventions.ConventionSet.get_ModelFinalizingConventions()'. at Microsoft.EntityFrameworkCore.InMemory.Metadata.Conventions.InMemoryConventionSetBuilder.CreateConventionSet() at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.RuntimeConventionSetBuilder.CreateConventionSet() at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.CreateModel(DbContext context, IConventionSetBuilder conventionSetBuilder, ModelDependencies modelDependencies) at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.GetModel(DbContext context, ModelCreationDependencies modelCreationDependencies, Boolean designTime) at Microsoft.EntityFrameworkCore.Internal.DbContextServices.CreateModel(Boolean designTime) at Microsoft.EntityFrameworkCore.Internal.DbContextServices.get_Model()

    Executing the app generates the above errors.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Did you re-create the EF Core migrations and migrator again?

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09