It's quite helpful to include a direct link to the source code that produced a given package version, so your users can quickly see what's included (i.e. they may be tracking a bug fix).
If you are using Microsoft.SourceLink, you already have all the information you need automatically populated for you. The following target will update the description just before the nuget is produced:
<Target Name="UpdatePackageMetadata"BeforeTargets="PrepareForBuild;GetAssemblyVersion;GenerateNuspec;Pack"Condition="'$(RepositoryUrl)' != '' And '$(SourceRevisionId)' != ''"><PropertyGroup><Description>$(Description)Built from $(RepositoryUrl)/tree/$(SourceRevisionId.Substring(0, 9))</Description><!-- Update nuspec properties too --><PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl><PackageDescription> $(Description)</PackageDescription></PropertyGroup></Target>
If you're using GitInfo instead, you'll have to populate the
RepositoryUrl yourself, and replace