The <PackageLicenseUrl>
node has been deprecated and should be replaced by
either the <PackageLicenseExpression>
or the <PackageLicenseFile>
node
when referring to the license of a NuGet package.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<PackageLicenseUrl>https://github.com/Corniel/dotnet-project-file-analyzers/blob/main/LICENSE.md</PackageLicenseUrl>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup>
</Project>
Or:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
</PropertyGroup>
<ItemGroup>
<None Include="LICENSE.md" Pack="true" PackagePath="" />
</ItemGroup>
</Project>
Or disable packability:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
</Project>