NuGet Warning NU5125

The 'licenseUrl' element will be deprecated. Consider using the 'license' element instead.

Issue

The licenseUrl element is being replaced by the license element.

Solution

If you create your NuGet package using dotnet pack or msbuild -t:pack, follow the documentation on packaging a license expression or a license file using MSBuild targets.

If you use a .nuspec file, use the license element.