When I packaging license within the nupkg, I will using License to replace licentUrl.
I using this code to set the license as MIT but it can not pack.
<license type="MIT"/>
Because it is a newest feature.
If your nuget version is 5.0.2 that you should use this code.
<license type="expression">MIT</license>