Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Central Package Versions
<Project>
<ItemGroup>
<PackageReference Update="GitInfo" Version="2.0.20" PrivateAssets="all" />
<PackageReference Update="Newtonsoft.Json" DefaultVersion="12.0.3" />
</ItemGroup>
</Project>
<Project>
<ItemDefinitionGroup>
<PackageReference>
<DefaultVersion />
<Version />
</PackageReference>
</ItemDefinitionGroup>
<Target Name="UpdatePackageVersions" BeforeTargets="_GenerateRestoreGraph;_GenerateRestoreGraphProjectEntry;PrepareForBuild">
<ItemGroup>
<PackageReference Version="$([MSBuild]::ValueOrDefault('%(Version)', '%(DefaultVersion)'))" />
</ItemGroup>
</Target>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment