Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 953 Bytes

File metadata and controls

42 lines (32 loc) · 953 Bytes

Proj0205: Define the project repository URL explicitly

To ensure the creation of well-formed NuGet packages, explicitly define the <RepositoryUrl> 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>
    <RepositoryUrl>https://github.com/Corniel/dotnet-project-file-analyzers</RepositoryUrl>
  </PropertyGroup>

</Project>

Or disable packability:

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

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

</Project>