Microsoft.AspNetCore 已被弃用

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

  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <NoWarn>1701;1702;8618;</NoWarn>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
    <NoWarn>1701;1702;8618;</NoWarn>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="NLog" Version="5.2.8" />
    <FrameworkReference Include="Microsoft.AspNetCore.App" />
  </ItemGroup>

</Project>

csproj文件中加入

<FrameworkReference Include="Microsoft.AspNetCore.App" />
posted @ 2024-04-06 15:55  天天的蓝色  阅读(482)  评论(0编辑  收藏  举报