Reputation: 129
I'm trying to install Microsoft.EntityFrameworkCore.Tools using this command
Install-Package Microsoft.EntityFrameworkCore.Tools
via PowerShell and this error was appearing to me
Note: I need to install this in my machine, not just in the project
Upvotes: 4
Views: 5094
Reputation: 16495
In my case I had these repositories (Get-PackageSource command):
Name ProviderName Location
---- ------------ --------
nuget.org NuGet https://api.nuget.org/v3/index.json
nugetRepository NuGet https://www.nuget.org/api/v2
But the error was the same.
dotnet tool install --global dotnet-ef
You can validate the installation with
dotnet ef --help
If you will use the scaffolding feature, you will need
dotnet add package Microsoft.EntityFrameworkCore.Design --version 9.0.1
dotnet add package Microsoft.EntityFrameworkCore.SqlServer --version 9.0.1
Also a net project is required. I mean you can't execute the scaffolding globally on any folder
Upvotes: 0
Reputation: 9739
Looks like the package manager source needs to be fixed. If you are using Visual Studio, navigate to Tools >> Nuget Package Manager >> Package Manager Settings and verify the package source.
Upvotes: 1