Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/311.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# PMC错误:术语';获取管理信息';未识别为cmdlet的名称_C#_Entity Framework Core_Asp.net Core 2.2 - Fatal编程技术网

C# PMC错误:术语';获取管理信息';未识别为cmdlet的名称

C# PMC错误:术语';获取管理信息';未识别为cmdlet的名称,c#,entity-framework-core,asp.net-core-2.2,C#,Entity Framework Core,Asp.net Core 2.2,我是asp.net核心的新手,正在开发一个MVC应用程序。尝试查看实体框架迁移时遇到错误 PMC命令: PM> get-migrations 答复: get-mgrations : The term 'get-mgrations' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a pat

我是asp.net核心的新手,正在开发一个MVC应用程序。尝试查看实体框架迁移时遇到错误

PMC命令:

PM> get-migrations
答复:

get-mgrations : The term 'get-mgrations' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is 
correct and try again.
At line:1 char:1
+ get-mgrations
+ ~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (get-mgrations:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

我想不出是怎么回事。我的猜测是,可能是我的dotnet框架被破坏了或者其他什么

我试过:

  • 重新安装VS2019
  • 删除entityframeworkcore sdk文件夹并运行
    dotnet restore
    命令
  • 之前,我修复了
    nuget
    命令的相同错误,方法是识别nuget.exe丢失,下载并设置路径(希望您知道我的意思)
  • 重新安装Microsoft.AspNetCore.App软件包
没有任何帮助

AdMarket.csproj:

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp2.2</TargetFramework>
    <UserSecretsId>aspnet-AdMarket-C5C71703-513A-471A-959E-3C883B2380D5</UserSecretsId>
    <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.App" Version="2.2.7" />
    <PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
    <PackageReference Include="MySql.Data.EntityFrameworkCore" Version="8.0.17" />
  </ItemGroup>

  <ItemGroup>
    <Folder Include="Areas\Identity\Services\" />
  </ItemGroup>

</Project>

netcoreapp2.2
aspnet-AdMarket-C5C71703-513A-471A-959E-3C883B2380D5
过程中

问题是,在其他项目上也会发生相同的错误。

get migrations
在Package Manager控制台中不能作为命令使用,有关可用命令的列表,请参阅


您可以使用提供该命令的,或手动检查目录中生成的文件。

get migrations
在Package Manager控制台中不能作为命令使用,有关可用命令的列表,请参阅

可以使用提供命令的,也可以手动检查目录中生成的文件