github microsoft/MSBuildSdks Microsoft.Build.CentralPackageVersions.2.0.1

latest releases: Microsoft.Build.CopyOnWrite.1.0.334, Microsoft.Build.Artifacts.6.1.48, Microsoft.Build.CopyOnWrite.1.0.333...
6 years ago

What's New

  • Version 2.0 of central package versions (#31)

Version 2.0 Breaking Changes

In version 2.0 of the package, we have deprecated the PackageVersion item and instead are using <PackageReference Update="Package" />. To migrate an existing code base to use the newer version, please do the following:

  1. Search and replace PackageVersion Include with PackageReference Update in your Packages.props

    v1.0:
    <ItemGroup>
      <PackageVersion Include="PackageA" Version="1.0.0" />
    </ItemGroup>
    v2.0:
    <ItemGroup>
      <PackageReference Update="PackageA" Version="1.0.0" />
    </ItemGroup>
  2. Remove all PackageVersion items in Packages.props for global package references and instead specify the version on the <GlobalPackageReference /> item

    v1.0:
    <ItemGroup>
      <PackageVersion Include="PackageA" Version="1.0.0" />
      <GlobalPackageReference Include="PackageA" />
    </ItemGroup>
    v2.0:
    <ItemGroup>
      <GlobalPackageReference Include="PackageA" Version="1.0.0" />
    </ItemGroup>
  3. Remove all PackageVersion items in individual projects, set VersionOverride to override a version, and move metadata to the corresponding <PackageReference/> item in the project file.

    v1.0:
    <ItemGroup>
      <PackageVersion Include="PackageA" Version="1.0.0" ExcludeAssets="Build" />
      <PackageReference Include="PackageA" />
    </ItemGroup>
    v2.0:
    <ItemGroup>
      <PackageReference Include="PackageA" VersionOverride="1.0.0" ExcludeAssets="Build" />
    </ItemGroup>

Don't miss a new MSBuildSdks release

NewReleases is sending notifications on new releases.