我不确定是否应该在6.0.0预览版的M1 Mac上使用EFCore。我正在做一个udemy课程,在终端中无法运行"dotnet ef“命令进行迁移时,我停了下来。
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文件。
<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>如果我做错了什么,你能给我提个建议吗?
发布于 2021-10-20 14:59:02
问题是这样的:https://github.com/dotnet/efcore/issues/25927
您可以将dotnet-ef作为解决方案安装在本地:
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local dotnet-ef --version 6.0.0-rc.2.21480.5https://stackoverflow.com/questions/68583180
复制相似问题