软件包 Humanizer.Core.XX 2.14.1 与 net8.0 不兼容(.NETCoreApp 版本=v8.0)

问题描述 投票:0回答:1

使用 EF Core 将我的 ASP.NET 项目从 .NET 7 升级到 .NET 8 后,我收到这些警告,阻止我在 Rider 中安装任何 NuGet 包。该项目仍然可以构建和编译。我尝试删除解决方案中的所有

bin
obj
目录,然后已经进行 NuGet 强制恢复,但到目前为止没有任何变化。

我的.csproj 文件:

<Project Sdk="Microsoft.NET.Sdk.Web">

    <PropertyGroup>
        <TargetFramework>net8.0</TargetFramework>
        <Nullable>disable</Nullable>
        <IsPackable>false</IsPackable>
        <SpaRoot>ClientApp\</SpaRoot>
        <DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
        <LangVersion>12</LangVersion>
        <Authors>Felix Winterleitner</Authors>
        <Deterministic>false</Deterministic>
        <Title>MyApp</Title>
        <RepositoryType>git</RepositoryType>
        <SpaProxyLaunchCommand>npm start</SpaProxyLaunchCommand>
    </PropertyGroup>

    <ItemGroup>
        <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.1" />
        <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.1" />
        <PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.1.0" />
        <PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="5.1.0" />
        <PackageReference Include="Microsoft.AspNetCore.SpaProxy" Version="8.0.1" />
        <PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.1" />
        <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.1">
            <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
            <PrivateAssets>all</PrivateAssets>
        </PackageReference>
        <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.1">
            <PrivateAssets>all</PrivateAssets>
            <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        </PackageReference>
        <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.0">
            <ExcludeAssets>runtime</ExcludeAssets>
        </PackageReference>
        <PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="8.0.1" />
        <PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.1" />
        <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
        <PackageReference Include="Serilog.AspNetCore" Version="6.1.0" />
        <PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
        <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.3.0" />
    </ItemGroup>

</Project>

我该如何解决这个问题?

c# entity-framework-core nuget .net-8.0 humanizer
1个回答
0
投票

好吧,我通过将 Humanizer.Core NuGet 包显式添加到我的项目中解决了这个问题(之前,它是与 EFCore 包一起隐式安装的)。

© www.soinside.com 2019 - 2024. All rights reserved.