首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >M1 Mac上的VSCode无法在终端中运行"dotnet ef“命令

M1 Mac上的VSCode无法在终端中运行"dotnet ef“命令
EN

Stack Overflow用户
提问于 2021-07-29 21:52:51
回答 1查看 691关注 0票数 1

我不确定是否应该在6.0.0预览版的M1 Mac上使用EFCore。我正在做一个udemy课程,在终端中无法运行"dotnet ef“命令进行迁移时,我停了下来。

代码语言:javascript
复制
me@my-MBP-2 dotnet-rpg % dotnet tool update --global dotnet-ef 
Tool 'dotnet-ef' was reinstalled with the latest stable version (version '5.0.8').

me@my-MBP-2 dotnet-rpg % dotnet ef -h    
me@my-MBP-2 dotnet-rpg % 

我试图更新所有的EFCore包到6.0.0版本,认为我的解决方案,但仍然不能进行。

这是我的.csproj文件。

代码语言:javascript
复制
<Project Sdk="Microsoft.NET.Sdk.Web">

 <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <RootNamespace>dotnet_rpg</RootNamespace>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="8.1.1" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.8" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="5.0.8" />
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0-preview.6.21352.1" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0-preview.6.21352.1">
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.0-preview.6.21352.1" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0-preview.6.21352.1">
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>
    <PackageReference Include="Swashbuckle.AspNetCore" Version="6.1.4" />
  </ItemGroup>

</Project>

如果我做错了什么,你能给我提个建议吗?

EN

回答 1

Stack Overflow用户

发布于 2021-10-20 14:59:02

问题是这样的:https://github.com/dotnet/efcore/issues/25927

您可以将dotnet-ef作为解决方案安装在本地:

代码语言:javascript
复制
dotnet new tool-manifest # if you are setting up this repo

dotnet tool install --local dotnet-ef --version 6.0.0-rc.2.21480.5
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68583180

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档