How to fix "Could not load file or assembly"

Manh Cuong 5 Reputation points
2025-02-06T16:06:29.7933333+00:00

Hi, I am currently facing some issues while adding scaffolded either as controller or view.

Here is some information about my package

Screenshot 2025-02-06 225537

And here is the error I keep getting when trying to create

Screenshot 2025-02-05 231410

With some previous projects I still use it, but maybe I accidentally updated something that makes it not work anymore, I tried many ways on the internet but it didn't work

I need help, Thanks a lot!!!

Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other
A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.
{count} vote

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 31,151 Reputation points Microsoft External Staff
    2025-02-07T02:45:43.1666667+00:00

    Hi @Manh Cuong

    Welcome to Microsoft Q&A! 

    Please check if you have the ‘Microsoft.EntityFrameworkCore.Design’ assembly referenced in your project or not. And ensure the assembly version is 8.0.11.  

    You can try to reinstall the package ‘Microsoft.EntityFrameworkCore.Design’ by right-clicking on project > Manage NuGet Packages > Browse > search for “Microsoft.EntityFrameworkCore.Design”. 

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".  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' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.