Open Closed

got-errors--after-upgrade-to-81 Volo.Abp.AspNetCore.Mvc still use Microsoft.AspNetCore.Mvc.Versioning #7006


User avatar
0
mc86 created
  • ABP Framework version: v8.1.0
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

https://docs.abp.io/en/commercial/latest/migration-guides/v8_1#use-asp-versioning-mvc-to-replace-microsoft-aspnetcore-mvc-versi

2024-04-07 11:27:43.110 +08:00 [FTL] Host terminated unexpectedly! Volo.Abp.AbpInitializationException: An error occurred during ConfigureServicesAsync phase of the module Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcModule, Volo.Abp.AspNetCore.Mvc, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.AspNetCore.Mvc.Versioning, Version=5.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. 系统找不到指定的文件。 File name: 'Microsoft.AspNetCore.Mvc.Versioning, Version=5.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' at System.ModuleHandle.ResolveType(QCallModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type) at System.ModuleHandle.ResolveTypeHandle(Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(MetadataToken caCtorToken, MetadataImport& scope, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder1& derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctorWithParameters, Boolean& isVarArg) at System.Reflection.CustomAttribute.IsCustomAttributeDefined(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Int32 attributeCtorToken, Boolean mustBeInheritable) at System.Reflection.CustomAttribute.IsDefined(RuntimeType type, RuntimeType caType, Boolean inherit) at System.Attribute.IsDefined(MemberInfo element, Type attributeType, Boolean inherit) at Microsoft.AspNetCore.Mvc.Controllers.ControllerFeatureProvider.IsController(TypeInfo typeInfo) 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() --- 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, Action`1 optionsAction) at Vote.Blazor.Program.Main(String[] args) in F:\SynologyDrive\项目_代码\Vote8.1\src\Vote.Blazor\Program.cs:line 44


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

    hi

    Can you reproduce this in a new template project?

    liming.ma@volosoft.com

  • User Avatar
    0
    mc86 created

    hi Can‘t reproduce this in a new template project. it seems in single-layer project the Volo.Abp.AspNetCore.Mvc.dll still references to Microsoft.AspNetCore.Mvc.Versioning

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    it seems in single-layer project the Volo.Abp.AspNetCore.Mvc.dll still references to Microsoft.AspNetCore.Mvc.Versioning

    What is the version of Volo.Abp.AspNetCore.Mvc.dll?

  • User Avatar
    0
    mc86 created

    Volo.Abp.AspNetCore.Mvc, Version=8.1.0.0

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    See https://www.nuget.org/packages/Volo.Abp.AspNetCore.Mvc/8.1.0#dependencies-body-tab

    There is no Microsoft.AspNetCore.Mvc.Versioning dependences.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on July 17, 2025, 06:22