NullableEnable.props 649 B

1234567891011
  1. <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  2. <!--
  3. The Nullable annotations on netstandard2.0 are incomplete and incorrect in places. Ignore
  4. nullable warnings before .NET 6 and make them errors on later target frameworks.
  5. -->
  6. <PropertyGroup>
  7. <Nullable>enable</Nullable>
  8. <WarningsAsErrors Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">$(WarningsAsErrors);nullable</WarningsAsErrors>
  9. <NoWarn Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">$(NoWarn);nullable</NoWarn>
  10. </PropertyGroup>
  11. </Project>