0

I'm creating an ASP.NET Core MVC Project and I can't install Entity Framework Core. I tried to run this command

dotnet add package Microsoft.EntityFrameworkCore.InMemory

in the console and I get this:

PS C:\Users\Nicolas\Desktop\Courses\Udemy\MVCExample> dotnet add package Microsoft.EntityFrameworkCore.InMemory
  Writing C:\Users\Nicolas\AppData\Local\Temp\tmpE0E7.tmp
info : Adding PackageReference for package 'Microsoft.EntityFrameworkCore.InMemory' into project 'C:\Users\Nicolas\Desktop\Courses\Udemy\MVCExample\Udemy.csproj'.
info : Restoring packages for C:\Users\Nicolas\Desktop\Courses\Udemy\MVCExample\Udemy.csproj...
info :   GET http://packagesource/FindPackagesById()?id='Microsoft.EntityFrameworkCore.InMemory'&semVerLevel=2.0.0
log  : Retrying 'FindPackagesByIdAsyncCore' for source 'http://packagesource/FindPackagesById()?id='Microsoft.EntityFrameworkCore.InMemory'&semVerLevel=2.0.0'.
log  : No such host is known.
info :   GET http://packagesource/FindPackagesById()?id='Microsoft.EntityFrameworkCore.InMemory'&semVerLevel=2.0.0
log  : Retrying 'FindPackagesByIdAsyncCore' for source 'http://packagesource/FindPackagesById()?id='Microsoft.EntityFrameworkCore.InMemory'&semVerLevel=2.0.0'.
log  : No such host is known.
info :   GET http://packagesource/FindPackagesById()?id='Microsoft.EntityFrameworkCore.InMemory'&semVerLevel=2.0.0
error: Failed to retrieve information about 'Microsoft.EntityFrameworkCore.InMemory' from remote source 'http://packagesource/FindPackagesById()?id='Microsoft.EntityFrameworkCore.InM
emory'&semVerLevel=2.0.0'.
error:   No such host is known.

Does anyone know what's happening? I can't find a solution to this problem

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • 1
    are you using some cusom package source instead of nuget? What's http://packagesource ? – Roman Kalinchuk Jun 21 '20 at 21:31
  • No, I just installed .NET Core 3.1 SDK (v3.1.301) and I'm running the command with Powershell console :( Should I try to configure the nugget source? How could I do it? – Nicolás Aldao Jun 21 '20 at 22:06
  • Please try -s https://api.nuget.org/v3/index.json parameter – Roman Kalinchuk Jun 21 '20 at 22:32
  • 1
    I fixed it!! I found the answer on how to configure the nugget source here: https://stackoverflow.com/questions/54785951/unable-to-install-packages-using-dotnet-add-package Thanks man for help me!! – Nicolás Aldao Jun 21 '20 at 22:46

0 Answers0