asp.net-core - ASP.NET 核心 3.1:将类库添加到 Project_MissingMethodException:找不到方法:'Boolean Microsoft.EntityFrameworkCore.Migrations
问题描述
我正在处理asp.net-core 3.1
项目,我为我的项目添加了 3 个类库来分隔访问数据、模型类和实用程序类我解决了匹配文件夹等问题。但是当我运行我的项目时,我得到了这个错误:
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)
解决方案
我发现一个解决方案可以帮助解决错误:
MissingMethodException:找不到方法:'Boolean Microsoft.EntityFrameworkCore.Migrations.IMigrationsModelDiffer.HasDifferenc
推荐阅读
- c# - Application Speech to text..ie,从 uart 到文本输出的音频输入
- node.js - 币安签名 api 调用 nodejs 12 AWS Lambda
- java - maven surefire 插件不使用 --enable-preview 模式
- java - 关于接口的不适用方法错误
- charts - 如何通过stimulsoft中的组等参数显示总值
- python - 如何在 Python 中自动更新文件名列表
- python-3.x - 检查三个输入是否形成三角形
- python - 如果 -1 < x < 0,为什么 Python 会为操作 x**x 返回一个复数?
- node.js - Node.js Firestore forEach 集合查询无法填充关联数组
- sql - 通过更改参数过滤 SQL 表