Skip to content

Latest commit

 

History

History
55 lines (42 loc) · 1.19 KB

File metadata and controls

55 lines (42 loc) · 1.19 KB

Proj0240: Enable package validation

To ensure the (backwards) compatibility of the API surface of your package, it is adviced to enable package validation by defining the <EnablePackageValidation> node with value true.

More information can be found here.

Non-compliant

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

  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <IsPackable>true</IsPackable>
  </PropertyGroup>

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

  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <IsPackable>true</IsPackable>
    <EnablePackageValidation>false</EnablePackageValidation>
  </PropertyGroup>

</Project>

Compliant

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

  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <IsPackable>true</IsPackable>
    <EnablePackageValidation>true</EnablePackageValidation>
  </PropertyGroup>

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

  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <IsPackable>false</IsPackable>
  </PropertyGroup>

</Project>