Microsoft.EntityFrameworkCore.Tools 3.1.4。添加迁移不起作用

时间:2020-05-13 18:14:27

标签: c# .net entity-framework-core

我想在我的EF Core Lib项目中使用迁移。

我安装了NuGet软件包

  • Microsoft.EntityFrameworkCore 3.1.4
  • Microsoft.EntityFrameworkCore.SqlServer 3.1.4
  • Microsoft.EntityFrameworkCore.Tools 3.1.4

但是Add-Migration命令从未出现在PM控制台中。

当我重新启动Visual Studio 2019时。PM控制台中出现错误:

Package Manager Console Host Version 5.5.0.6473

Type 'get-help NuGet' to see all available NuGet commands.

& : The term 'C:\Users\ruslan.runchev\.nuget\packages\microsoft.entityframeworkcore.tools\3.1.4\tools\init.ps1' is not recognized as the n
ame of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the pa
th is correct and try again.
At line:1 char:45
+ ... rgs+=$_}; & 'C:\Users\ruslan.runchev\.nuget\packages\microsoft.entity ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\ruslan...\tools\init.ps1:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PM> 

我该如何解决这个问题?

0 个答案:

没有答案