Cannot install dotnet-ef tool on Windows 10

dotnet tool install -g dotnet-ef --ignore-failed-sources worked for me. Thanks to Anas-Alhariri

Source


I had the same issue on Mac OS recently. It was related to the fact that we use our own NuGet feed (packageSources section). So, I fixed that by removing the custom NuGet feed from NuGet.config file for a while.


If everything else failed then you should check in your Visual Studio the next route: Tools > NuGet Package Manager > Package Manager Settings > Nuget Package Manager > Package Sources. There you should have nuget.org, if not and you only have Microsoft Visual Studio Offline Packages, well that is the problem. Next you need to add the package resource nuget.org like this: enter image description here

Once you click Ok you can go back to your terminal and install dotnet-ef with no problem.


I got it working by adding the --version flag and specifying the version to 3.0.0.

The command that I used:

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