How to add an implementation of IDesignTimeDbContextFactory to add migration to .Net core 2.0 application?

后端 未结 3 1010
眼角桃花
眼角桃花 2021-01-17 21:16

I am trying to run Add-Migration InitialCreate command from package manager console from a .NET Core 2.0 MVC application. After looking at all possible sources still not abl

3条回答
  •  爱一瞬间的悲伤
    2021-01-17 21:41

    Had the same issue. It happened after i updated Microsoft.AspNetCore.All from 2.0.0-preview2-final to 2.0.0. Guess the reason why it fails is that i have .NET Core Preview 2 runtime installed.

    EFCore got updated too. So please, make sure you have same nuget and runtime versions

    UPDATE: Now .NET Core runtime and SDK 2.0 released https://www.microsoft.com/net/download/core. After install you can safely update your packages to 2.0.0

提交回复
热议问题