Starts in:
2 DAYS
2 HRS
48 MIN
59 SEC
Starts in:
2 D
2 H
48 M
59 S
Open Closed

Upgrading the ABP UI project to 7.1.1 #4862


User avatar
0
viswajwalith created
  • ABP Framework version: v7.1.1
  • UI type: MVC
  • DB provider: EF Core / MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:" We are having a Micro service based solution and now we are trying to upgrade the only web layer (UI layer in MVC ) to abp 7.1.1.

I tried by upgrading all abp versions to 7.1.1 also tried with combinations. but getting the below error in both the cases.

Volo.Abp.AbpInitializationException: An error occurred during ConfigureServicesAsync phase of the module Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcModule, Volo.Abp.AspNetCore.Mvc, Version=7.1.0.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details. ---> System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Could not load type 'Volo.Abp.EventBus.ILocalEventHandler1' from assembly 'Volo.Abp.EventBus, Version=7.1.1.0, Culture=neutral, PublicKeyToken=null'. at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) at Microsoft.AspNetCore.Mvc.Controllers.ControllerFeatureProvider.PopulateFeature(IEnumerable1 parts, ControllerFeature feature) at Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartManager.PopulateFeature[TFeature](TFeature feature) at Microsoft.Extensions.DependencyInjection.MvcCoreMvcBuilderExtensions.AddControllersAsServices(IMvcBuilder builder) at Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcModule.ConfigureServices(ServiceConfigurationContext context) at Volo.Abp.Modularity.AbpModule.ConfigureServicesAsync(ServiceConfigurationContext context) at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync() System.TypeLoadException: Could not load type 'Volo.Abp.EventBus.ILocalEventHandler1' from assembly 'Volo.Abp.EventBus, Version=7.1.1.0, Culture=neutral, PublicKeyToken=null'. --- End of inner exception stack trace --- at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync() at Volo.Abp.AbpApplicationFactory.CreateAsync[TStartupModule](IServiceCollection services, Action1 optionsAction) at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplicationAsync[TStartupModule](IServiceCollection services, Action1 optionsAction) at Microsoft.Extensions.DependencyInjection.WebApplicationBuilderExtensions.AddApplicationAsync[TStartupModule](WebApplicationBuilder builder, Action1 optionsAction) at Exceego.EHSWatch.AppV3.Web.Program.Main(String[] args) in C:\Official\EHSWatchV3\repo\EHSWatch_AppV3\apps\web\src\Exceego.EHSWatch.AppV3.Web\Program.cs:line 29

My UI layer Project file looks like below

<ItemGroup>
	<PackageReference Include="DocumentFormat.OpenXml" Version="2.19.0" />
	<PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="6.0.4" />
	<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="6.0.0" />
	<PackageReference Include="Microsoft.Data.SqlClient" Version="5.0.0" />
	<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite" Version="2.1.0" />
	<PackageReference Include="Volo.Abp.BackgroundJobs" Version="5.1.3" />
    <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="6.0.0" />
    <PackageReference Include="Microsoft.Data.SqlClient" Version="5.0.0" />
	<PackageReference Include="OpenAI" Version="1.6.0" />
    <PackageReference Include="Volo.Abp.BackgroundJobs" Version="5.1.3" />
</ItemGroup>
<ItemGroup>
	<PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" Version="5.1.3" />
	<PackageReference Include="Volo.Abp.EventBus.RabbitMQ" Version="7.1.1" />
	<PackageReference Include="Volo.Abp.AspNetCore.Mvc.Client" Version="7.1.1" />
	<PackageReference Include="Volo.Abp.AspNetCore.Authentication.OpenIdConnect" Version="5.1.3" />
	<PackageReference Include="Volo.Abp.Http.Client.Web" Version="5.1.3" />
	<PackageReference Include="Volo.Abp.Http.Client.IdentityModel.Web" Version="5.1.3" />
	<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton" Version="5.1.3" />
	<PackageReference Include="Volo.Abp.Account.Pro.Public.HttpApi.Client" Version="5.1.3" />

</ItemGroup>

Note I tried with all abp 7.1.1 also, but same issue.

Please advise.


9 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    You should make sure all abp packages upgrade to 7.1.1

    BTW, ABP 7.1.1 is based on NET 7.0, you need to also upgrade all Microsoft's packages.

    You can check the migration guide: https://docs.abp.io/en/commercial/latest/migration-guides/index

    When you done, please run dotnet clean & dotnet build command.

  • User Avatar
    0
    viswajwalith created

    Hi,

    You should make sure all abp packages upgrade to 7.1.1

    BTW, ABP 7.1.1 is based on NET 7.0, you need to also upgrade all Microsoft's packages.

    You can check the migration guide: https://docs.abp.io/en/commercial/latest/migration-guides/index

    When you done, please run dotnet clean & dotnet build command.

    Hi As I mentioned earlier I already tried with all packages with 7.1.1 anyhow I did tried again and obviously .net version is 7

    still getting the below error

    2023-04-11 13:13:57.474 +05:30 [FTL] Exceego.EHSWatch.AppV3.Web terminated unexpectedly! Volo.Abp.AbpInitializationException: An error occurred during ConfigureServicesAsync phase of the module Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcModule, Volo.Abp.AspNetCore.Mvc, Version=7.1.1.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details. ---> System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Could not load type 'Volo.Abp.EventBus.ILocalEventHandler1' from assembly 'Volo.Abp.EventBus, Version=7.1.1.0, Culture=neutral, PublicKeyToken=null'. at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) at Microsoft.AspNetCore.Mvc.Controllers.ControllerFeatureProvider.PopulateFeature(IEnumerable1 parts, ControllerFeature feature) at Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartManager.PopulateFeature[TFeature](TFeature feature) at Microsoft.Extensions.DependencyInjection.MvcCoreMvcBuilderExtensions.AddControllersAsServices(IMvcBuilder builder) at Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcModule.ConfigureServices(ServiceConfigurationContext context) at Volo.Abp.Modularity.AbpModule.ConfigureServicesAsync(ServiceConfigurationContext context) at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync() System.TypeLoadException: Could not load type 'Volo.Abp.EventBus.ILocalEventHandler1' from assembly 'Volo.Abp.EventBus, Version=7.1.1.0, Culture=neutral, PublicKeyToken=null'. --- End of inner exception stack trace --- at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync() at Volo.Abp.AbpApplicationFactory.CreateAsync[TStartupModule](IServiceCollection services, Action1 optionsAction) at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplicationAsync[TStartupModule](IServiceCollection services, Action1 optionsAction) at Microsoft.Extensions.DependencyInjection.WebApplicationBuilderExtensions.AddApplicationAsync[TStartupModule](WebApplicationBuilder builder, Action1 optionsAction) at Exceego.EHSWatch.AppV3.Web.Program.Main(String[] args) in C:\Official\EHSWatchV3\repo\EHSWatch_AppV3\apps\web\src\Exceego.EHSWatch.AppV3.Web\Program.cs:line 29

    Let me know if anything is missing

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Could you share a project that can reproduce the problem? shiwei.liang@volosoft.com I will check it.

  • User Avatar
    0
    viswajwalith created

    Hi,

    Could you share a project that can reproduce the problem? shiwei.liang@volosoft.com I will check it.

    It has couple of dependent projects, do u think just sharing the web (UI) project works for you to replicate the issue?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    do u think just sharing the web (UI) project works for you to replicate the issue?

    No, it's not enough.

    It has couple of dependent projects

    Did you also upgrade the dependent projects?

  • User Avatar
    0
    viswajwalith created

    do u think just sharing the web (UI) project works for you to replicate the issue?

    No, it's not enough.

    It has couple of dependent projects

    Did you also upgrade the dependent projects?

    do you think it is necessary to update all other services as we are following micro service based architecture, those are just Rest full services and the UI layer has nothing to do with that technology stack/version right?

    But I have a question on one of the Project reference

    	        <ProjectReference Include="..\..\..\..\services\volo.filemanagement\src\Volo.FileManagement.HttpApi.Client\Volo.FileManagement.HttpApi.Client.csproj" />
    

    do you think all kind of services also need to be upgraded?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Yes, If there is a project dependency, then it is required

  • User Avatar
    0
    viswajwalith created

    Hi,

    Yes, If there is a project dependency, then it is required

    Hummm, ok. let me try that and update you accordingly.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    ok

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