Could not load type 'Microsoft.AspNetCore.Mvc.Internal.ActionConstraintCache' from assembly 'Microsoft.AspNetCore.Mvc.Core, upgrade to .Net 6

Chittoor Vibhakaran, Harish 0 Reputation points
2023-07-13T13:26:09.12+00:00

Could not load type 'Microsoft.AspNetCore.Mvc.Internal.ActionConstraintCache' from assembly 'Microsoft.AspNetCore.Mvc.Core, Version=6.0.0.0, Culture=neutral,

Getting this error while upgrade to .net 6.

Project upgrading from .Netcoreapp2.2 to .Net 6

Let me know to the issue

Developer technologies ASP.NET ASP.NET Core
Developer technologies Visual Studio Debugging
Developer technologies C#
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2023-07-13T15:12:45.3766667+00:00

    you probably need to upgrade your nuget packages to versions compatible with net 6. for example if you are using FluentValidation

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.