简体   繁体   中英

Unable to resolve 'Microsoft.EntityFrameworkCore (>= 3.1.7)' for '.NETCoreApp,Version=v3.1

Getting the error: Unable to resolve 'Microsoft.EntityFrameworkCore (>= 3.1.7)' for '.NETCoreApp,Version=v3.1

The project file looks like below:

Have anyone faced this issue?


  <PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.7" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.7">
      <publicAssets>all</publicAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="3.1.2" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\RDS_Models\RDS_Models.csproj" />
  </ItemGroup>

</Project>

Try to upgrade to .NET Core 3.1.8 and all dependencies . https://github.com/dotnet/core/releases

Try to update Visual Studio.

Everything will ok.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM