我正在尝试通过dotnet-cli安装dotnet-ef
工具。
我输入的命令:dotnet tool install --global dotnet-ef
我给我以下错误:
The tool package could not be restored.
Tool 'dotnet-ef' failed to install. This failure may have been caused by:
* You are attempting to install a preview release and did not use the --version option to specify the version.
* A package by this name was found,but it was not a .NET Core tool.
* The required NuGet feed cannot be accessed,perhaps because of an Internet connection problem.
* You mistyped the name of the tool.
我正在使用dotnet 3.0,我相信我在MacOS上没有这个问题,我现在正在尝试在Windows 10计算机上执行相同的命令,这给了我这个错误。
使用dotnet --info
命令的一些信息:
.NET Core SDK (reflecting any global.json):
Version: 3.0.100
Commit: 04339c3a26
Runtime Environment:
OS Name: Windows
OS Version: 10.0.18362
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.0.100\
Host (useful for support):
Version: 3.0.0
Commit: 7d57652f33
.NET Core SDKs installed:
3.0.100 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
microsoft.AspNetCore.All 2.1.13 [C:\Program Files\dotnet\shared\microsoft.AspNetCore.All]
microsoft.AspNetCore.App 2.1.13 [C:\Program Files\dotnet\shared\microsoft.AspNetCore.App]
microsoft.AspNetCore.App 3.0.0 [C:\Program Files\dotnet\shared\microsoft.AspNetCore.App]
microsoft.NETCore.App 2.1.13 [C:\Program Files\dotnet\shared\microsoft.NETCore.App]
microsoft.NETCore.App 3.0.0 [C:\Program Files\dotnet\shared\microsoft.NETCore.App]
microsoft.WindowsDesktop.App 3.0.0 [C:\Program Files\dotnet\shared\microsoft.WindowsDesktop.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download