-2
When trying to install the latest version of Entity Framework Core in a project, using Visual Studio 2019, via Microsoft’s Install-Package command.Entityframeworkcore, I came across the following response via console.
Trying to collect package dependency information 'Microsoft.EntityFrameworkCore. 5.0.3' in relation to the project 'Controlegeralpharmacy', aiming at.Netframework, Version=v4.7.2' A Collecting dependency information took 0.2 ms Trying to solve dependencies of the 'Microsoft.EntityFrameworkCore. 5.0.3' package with Dependencybehavior 'Lowest' Resolve dependency information took 0 ms solving actions to install the package 'Microsoft.EntityFrameworkCore. 5.0.3' Actions resolved to install the package 'Microsoft.EntityFrameworkCore. 5.0.3' Recovering the package 'Entityframeworkcore 5.0.3' from 'Nuget'. Installation failed. Reversing... The package 'Microsoft.EntityFrameworkCore. 5.0.3' does not exists in the project 'Controlegeralpharmacy' The package 'Microsoft.EntityFrameworkCore. 5.0.3' does not exist in the folder 'C: Users asw source Repos Controlegeralpharmacy Packages' Run nuget actions led 541 ms Install-Package : Could not install the 'Microsoft.Entityframeworkcore 5.0.3' package. You are trying to install this package in a project that is intended to '. Netframework,Version=v4.7.2', but the package does not contain any Assembly reference or content file that is compatible with this structure. For more information, please contact package author. In line:1 character:1
- Install-Package Microsoft.Entityframeworkcore
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
However when I try to install by specifying any version equal to the one below 3.1.12, the package installs itself without further problems.
the message seems very clear: "You are trying to install this package in a project that is intended for '.Netframework,Version=v4.7.2'," and package name is "'Microsoft.EntityFrameworkCore. 5.0.3'" try to install a vesão compatible with the framework you are using
– Ricardo Pontual