小编Jee*_*aJP的帖子

Core 3.0 升级后,无法使用 EF Core 3.0 添加迁移

升级 core 3.0 后,无法在包管理器中添加迁移。这是我的错误

PM> Add-Migration UpdateAlertTable -Context OozymContext
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.TypeLoadException: Could not load type 'Microsoft.EntityFrameworkCore.Internal.ProductInfo' from assembly 'Microsoft.EntityFrameworkCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor..ctor(Object reportHandler, IDictionary args)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, …
Run Code Online (Sandbox Code Playgroud)

.net c# .net-core-3.0 ef-core-3.0

9
推荐指数
2
解决办法
4471
查看次数

标签 统计

.net ×1

.net-core-3.0 ×1

c# ×1

ef-core-3.0 ×1