0

我已经安装了 ef core 6 并在 net6.0 中使用了 vs 2022 预览版。当我尝试添加第一个迁移时,出现以下错误。

PM> add-migration initial

构建开始...构建成功。System.IO.FileLoadException:无法加载文件或程序集“System.Runtime,版本=6.0.0.0,文化=中性,PublicKeyToken=b03f5f7f11d50a3a”。找到的程序集的清单定义与程序集引用不匹配。(来自 HRESULT 的异常:0x80131040)文件名:System.Reflection.RuntimeAssembly.GetType 处的“System.Runtime,Version=6.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a”(RuntimeAssembly 程序集,字符串名称,布尔 throwOnError,布尔 ignoreCase, ObjectHandleOnStack 类型,ObjectHandleOnStack keepAlive) 在 System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) 在 Microsoft.EntityFrameworkCore.Tools.ReflectionOperationExecutor..ctor(String assembly, String startupAssembly, String projectDir, String dataDirectory,

无法加载文件或程序集“System.Runtime,Version=6.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a”。找到的程序集的清单定义与程序集引用不匹配。(来自 HRESULT 的异常:0x80131040)

4

0 回答 0