Skip to content

Latest commit

 

History

History
56 lines (42 loc) · 1.14 KB

File metadata and controls

56 lines (42 loc) · 1.14 KB

Proj0202: Define the project description explicitly

To ensure the creation of well-formed NuGet packages, explicitly define the <Description> or <PackageDescription> node or disable package generation by defining the <IsPackable> node with value false.

Non-compliant

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

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

</Project>

Compliant

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

  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <IsPackable>true</IsPackable>
    <Description>Awesome library</Description>
  </PropertyGroup>

</Project>

Or:

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

  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <IsPackable>true</IsPackable>
    <PackageDescription>Awesome library</PackageDescription>
  </PropertyGroup>

</Project>

Or disable packability:

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

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

</Project>