简体   繁体   English

使用 netcoreapp3.0 安装 dotnet-ef 时遇到问题

[英]Facing Issue while Installing dotnet-ef with netcoreapp3.0

I am trying to use EF core Migration features.我正在尝试使用 EF 核心迁移功能。 But when I install dotnet-ef tools from NuGet, below error message is thrown.但是当我从 NuGet 安装 dotnet-ef 工具时,会抛出以下错误消息。 My app version is netcoreapp3.0.我的应用程序版本是 netcoreapp3.0。

dotnet tool install --global dotnet-ef --version 3.1.0-preview3.19554.8

error NU1202: Package dotnet-ef 3.1.0-preview3.19554.8 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0) / any.错误 NU1202:包 dotnet-ef 3.1.0-preview3.19554.8 与 netcoreapp3.0 (.NETCoreApp,Version=v3.0) / any 不兼容。 Package dotnet-ef 3.1.0-preview3.19554.8 supports: netcoreapp3.1 (.NETCoreApp,Version=v3.1) / any包 dotnet-ef 3.1.0-preview3.19554.8 支持:netcoreapp3.1 (.NETCoreApp,Version=v3.1) / any

Older version only support netcoreapp2.1旧版本仅支持 netcoreapp2.1

dotnet tool install --global dotnet-ef --version 3.0.1

error NU1202: Package dotnet-ef 3.0.1 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0) / any.错误 NU1202:包 dotnet-ef 3.0.1 与 netcoreapp3.0 (.NETCoreApp,Version=v3.0) / any 不兼容。 Package dotnet-ef 3.0.1 supports: netcoreapp2.1 (.NETCoreApp,Version=v2.1)包 dotnet-ef 3.0.1 支持:netcoreapp2.1 (.NETCoreApp,Version=v2.1)

Actually which dotnet-ef version is supporting netcoreapp3.0 Any idea?实际上哪个 dotnet-ef 版本支持 netcoreapp3.0 知道吗?

这在201911 月对我有用

dotnet tool install --global dotnet-ef --version 3.0.0

Please check this question and its answers: Update .NET Core Tools请检查此问题及其答案: 更新 .NET Core 工具

It appears to be a known bug, as pointed out by an answer to that question: https://github.com/dotnet/cli/issues/12963正如对该问题的回答所指出的那样,这似乎是一个已知错误: https : //github.com/dotnet/cli/issues/12963

The person who posted that question answered with a workaround they found.发布该问题的人回答了他们找到的解决方法。 Maybe it will work for you as well.也许它也适合你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 约束引用“字符串”无法解析为类型。 (netcoreapp3.0) - The constraint reference 'string' could not be resolved to a type. (netcoreapp3.0) zsh:找不到命令:dotnet-ef - zsh: command not found: dotnet-ef 一键发布dotnet工具安装dotnet-ef报错 - One Click Publish dotnet tool install dotnet-ef error 无法为面向 netcoreapp3.0 的 ASP.NET Core WebApp 中的特定 API 控制器启用 CORS - Can't enable CORS for specific API controllers in ASP.NET Core WebApp targeting netcoreapp3.0 为什么 Path.GetFullPath 返回带有额外“bin/Debug/netcoreapp3.0”的地址? - Why Path.GetFullPath returns the address with extra "bin/Debug/netcoreapp3.0"? 在netcoreapp3.0控制台应用程序中,默认情况下会生成myprogram.exe(带扩展名exe)。 它是什么? - In netcoreapp3.0 console application, myprogram.exe (with extension exe) is generated by default. What is it? 无法在 Windows 11 上安装 dotnet-ef 工具 - Cannot install dotnet-ef tool on Windows 11 将目标从 netcoreapp3.0 更改为 netstandard2.1 时缺少 TableAttribute - TableAttribute is missing when change target from netcoreapp3.0 to netstandard2.1 从已发布的应用程序运行dotnet-ef的任何方法 - Any way to run dotnet-ef from a published app 如何将 dotnet-ef 工具与 DI 实例化 DbContext 一起使用? - How to use dotnet-ef tools with DI instanciated DbContext?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM