gpt4 book ai didi

entity-framework-core - dotnet ef 工具自 vs2017/netcore1.1 起不起作用

转载 作者:行者123 更新时间:2023-12-04 03:07:39 33 4
gpt4 key购买 nike

我最近升级了一个项目以使用 efcore 1.1 以及 Visual Studio 2017 rc。同样使用win10。
dotnet ef命令以前没有问题,但现在它们只是抛出以下错误。
{path}.csproj : error MSB4057: The target "_EFGetProjectMetadata" does not exist in the project.Couldn't read metadata for project '{path}.csproj'. Ensure the package 'Microsoft.EntityFrameworkCore.Tools' is installed.
我验证了工具已安装,运行 dotnet restore ,一切构建/运行良好。只有 ef 工具会导致问题。

.csproj文件,出现以下内容。
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
<Version>1.1.0-preview4-final</Version>
</PackageReference>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet">
<Version>1.0.0-msbuild1-final</Version>
</DotNetCliToolReference>
</ItemGroup>

最佳答案

使用版本 1.0.0-msbuild1-finalMicrosoft.EntityFrameworkCore.Tools还。

<PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
<Version>1.0.0-msbuild1-final</Version>
</PackageReference>

这让我使用 dotnet core CLI 工具 1.0.0-preview3-004056 为我工作。

关于entity-framework-core - dotnet ef 工具自 vs2017/netcore1.1 起不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40664390/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com