C#で「このパッケージは、使用しているプロジェクトとの完全な互換性がない可能性があります。」警告を表示しないようにした話。

C# コンピュータ
C#

xxx.csprojファイルにNoWarnを追加

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

  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net9.0-windows</TargetFramework>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
    <UseWPF>true</UseWPF>
    <NoWarn>NU1701</NoWarn>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.135" />
    <PackageReference Include="ReactiveProperty.WPF" Version="9.6.0" />
  </ItemGroup>

</Project>

NU1701の警告を非表示にしてみました。

コメント