I needed to run db scaffolding so I came here to find "dotnet tool install --global dotnet-ef" command but it failed with error "Tool 'dotnet-ef' failed to install..." Running dotnet --version results in 3.1.100. So I ran "dotnet tool install --global dotnet-ef --version 3.1" and now dotnet-ef installed successfully. Not sure if this is something on my end or anyone else is experiencing this issue ?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@ihorbond I see no reason why the first command should fail while the second one succeeded. If you can provide full details of your system, including what is installed, and attach a project where this error happens, then we will investigate.
@ihorbond closing. If you can provide more information we can reopen this issue.
I have installed DotNet Core SDK 3.1.101 on Windows 10 Pro
This command won't work:
-> dotnet tool install --global dotnet-ef
error NU1100: Unable to resolve 'dotnet-ef ' for '.NETCoreApp,Version=v3.1'.
error NU1100: Unable to resolve 'dotnet-ef ' for '.NETCoreApp,Version=v3.1/any'.
The tool package could not be restored.
Tool 'dotnet-ef' failed to install. This failure may have been caused by:
For more reasons, including package naming enforcement, visit https://aka.ms/failure-installing-tool
I'm getting the same response when installing LUISGen
C:\Users\Tyler\Desktop\ChatWorks>dotnet tool install -g LUISGen
error NU1100: Unable to resolve 'luisgen (>= 0.0.0)' for '.NETCoreApp,Version=v3.1'.
error NU1100: Unable to resolve 'luisgen (>= 0.0.0)' for '.NETCoreApp,Version=v3.1/any'.
The tool package could not be restored.
Tool 'luisgen' 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.
For more reasons, including package naming enforcement, visit https://aka.ms/failure-installing-tool
Try specify the version of dotnet-ef. It worked for me;
dotnet tool install --global dotnet-ef --version 3.1.3
Hi I am getting the same error and I used 3.1.3
Recently had the same issue installing the latest version for .NET 5.
As suggested above, being explicit with the version also fixed my issue.
dotnet tool install --global dotnet-ef --version 5.0.0
Most helpful comment
Try specify the version of dotnet-ef. It worked for me;
dotnet tool install --global dotnet-ef --version 3.1.3