Ravel Sbrissa Okada
Ravel Sbrissa Okada

Reputation: 129

Installing Microsoft.EntityFrameworkCore.Tools

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 enter image description here

Note: I need to install this in my machine, not just in the project

Upvotes: 4

Views: 5094

Answers (2)

JRichardsz
JRichardsz

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.

Solution

dotnet tool install --global dotnet-ef

You can validate the installation with

dotnet ef --help

Source: https://www.nuget.org/packages/dotnet-ef

Additional

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

Yogi
Yogi

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.

enter image description here

Upvotes: 1

Related Questions