entity-framework-core - 包 Microsoft.EntityFrameworkCore.Sqlite 5.0.0-rc.1.20451.13 与 net50 (.NETFramework,Version=v5.0)/win7-x86 不兼容

标签 entity-framework-core nuget .net-5 asp.net-core-5.0

我想更新我的软件包,但我遇到了一些这样的错误:
错误是:

Error NU1202 Package Microsoft.EntityFrameworkCore.Sqlite 5.0.0-rc.1.20451.13 is not compatible with net50 (.NETFramework,Version=v5.0) / win7-x86. Package Microsoft.EntityFrameworkCore.Sqlite 5.0.0-rc.1.20451.13 supports: netstandard2.1 (.NETStandard,Version=v2.1) API E:...\API\API.csproj 1


API.csproj 文件:
<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>net5.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="8.0.1" />
    <PackageReference Include="CloudinaryDotNet" Version="1.11.0" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.7" />
    <PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.0-preview.8.20414.8" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.0-preview.8.20407.4">
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>
    <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.0-preview.8.20407.4" />
    <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.0-preview8" />
    <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.7.1" />
  </ItemGroup>

</Project>
nuget package manager

C:\WINDOWS\system32>dotnet --info .NET SDK (reflecting any global.json):
Version: 5.0.100-rc.1.20452.10
Commit: 473d1b592e

Runtime Environment:
OS Name: Windows
OS Version: 10.0.17763 OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.100-rc.1.20452.10\


command line
我怎么解决这个问题?

最佳答案

我遇到过同样的问题:
我从版本 更新了我的 Visual Studio 程序16.7 16.8 现在,问题解决了!
我手动检查更新
这个解决方案写在这个问题的评论中,但我想让它成为帮助像我这样的人的答案

关于entity-framework-core - 包 Microsoft.EntityFrameworkCore.Sqlite 5.0.0-rc.1.20451.13 与 net50 (.NETFramework,Version=v5.0)/win7-x86 不兼容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64144137/

相关文章:

asp.net-core - 如果在发布文件夹外执行 dotnet,dotnet 不会加载 appsettings.json

c# - IQueryable 排除重复列但保留所有空值

msbuild - msbuild/t :Pack supported in full . 是网络框架吗?

c# - Nuget 无法管理从 git 克隆的项目中的引用

.net - NuGet 自动包还原不适用于 MSBuild

c# - 为什么 ApiAuthorization 在 .NET 5 中不起作用

c# - 在asp.net core Controller 中获取 "Request Payload"

c# - Entity Framework Core 中的自引用多对多关系

c# - 如何在 SaveContext 上更新修改和删除的实体?

asp.net-core - web.config 中的 ASP.NET 5/EF7 连接字符串?