将迁移添加到MVC dotnotcore 2.0应用程序时出现实体FrameWork错误

时间:2018-03-06 10:19:00

标签: asp.net-mvc entity-framework .net-core

我是dot net core和EF core的新手。在包管理器控制台中,当我键入'EntityFrameworkCore \ Add-Migration Initial'时,我收到以下错误。

PM> EntityFrameworkCore\Add-Migration Initial
Both Entity Framework Core and Entity Framework 6.x commands are installed. The Entity Framework Core version is executing. You can fully qualify the command to select which one to execute, 'EntityFramework\Add-Migration' for EF6.x and 'EntityFrameworkCore\Add-Migration' for EF Core.
EntityFrameworkCore\Add-Migration : Exception calling "CreateInstanceAndUnwrap" with "8" argument(s): "Could not load file or assembly 
'Microsoft.EntityFrameworkCore.Design.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The system cannot find the file 
specified."
At line:1 char:1
+ EntityFrameworkCore\Add-Migration Initial
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Add-Migration], MethodInvocationException
    + FullyQualifiedErrorId : FileNotFoundException,Add-Migration

我已经搜索了错误,但尚未找到任何可行的解决方案。有任何想法吗?我的机器是64位运行Windows 10.我使用的是VS 2017 professional 15.5.2

非常感谢

0 个答案:

没有答案