How to Fix Unhandled exception. System.TypeLoadException: Could not load type 'Microsoft.EntityFrameworkCore.Storage.IRelationalValueBufferFactoryFactory' from assembly 'Microsoft.EntityFrameworkCore.Relational, Version=8.0.0.0, Culture=neutral, PublicKey

Mani 0 Reputation points
2024-01-05T06:18:23.4433333+00:00

I have upgraded my application from dotnet version 3 to 8.while i tried to run my application, i am facing this issue

Unhandled exception. System.TypeLoadException: Could not load type 'Microsoft.EntityFrameworkCore.Storage.IRelationalValueBufferFactoryFactory' from assembly 'Microsoft.EntityFrameworkCore.Relational, Version=8.0.0.0, Culture=neutral, PublicKeyToken=a..

Developer technologies | .NET | Entity Framework Core
Windows for business | Windows Client for IT Pros | User experience | Other
Developer technologies | .NET | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Wenbin Geng 741 Reputation points Microsoft External Staff
    2024-01-05T09:44:54.1966667+00:00

    Hi @Mani, Welcome to Microsoft Q&A.

    Have you tried updating the nuget package of Npgsql.EntityFrameworkCore.PostgreSQL to 8.0.0? If updating Npgsql.EntityFrameworkCore.PostgreSQL to 8.0.0 doesn't work for you please let me know.

    User's image

    Best Regards,

    Wenbin


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    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.