ASP.NET core 3.1 :Adding Classes Libraries to the Project_ MissingMethodException: Method not found: 'Boolean Microsoft.EntityFrameworkCore.Migrations

Viewed 4588

I'm working on asp.net-core 3.1 project, I have added 3 Class Library for my project to separate Access Data, Models class and Utility classes I resolved problems of matching folders etc. But when I run my project I get this Error:

MissingMethodException: Method not found: 'Boolean Microsoft.EntityFrameworkCore.Migrations.IMigrationsModelDiffer.HasDifferences(Microsoft.EntityFrameworkCore.Metadata.IModel, Microsoft.EntityFrameworkCore.Metadata.IModel)'.


   Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware.Invoke(HttpContext 
   httpContext)
   System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start<TStateMachine>(ref TStateMachine 
   stateMachine)
   System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start<TStateMachine>(ref TStateMachine 
   stateMachine)
   Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware.Invoke(HttpContext 
   httpContext)
   Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)  
3 Answers

A straight forward fix for me in Dotnet core 3.1 is to comment out

app.UseDatabaseErrorPage();

in the startup.cs file Configure Method

Related