Skip to content

Commit

Permalink
Work against .NET SDK update ManagePackageVersionsCentrally change
Browse files Browse the repository at this point in the history
.NET SDK 8.0.300 changed ManagePackageVersionsCentrally to be implicitly set if Directory.Packages.props exists. We do not want this, as we intentionally have some projects that have it disabled.

We now explicitly unset the value in the Directory.Packages.props file to get the old behavior back.

See dotnet/core#9309
  • Loading branch information
PJB3005 committed May 15, 2024
1 parent 63df90f commit 799702b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
<Project>
<PropertyGroup>
<!--
We actually set ManagePackageVersionsCentrally manually in another import file.
Since .NET SDK 8.0.300, ManagePackageVersionsCentrally is automatically set if Directory.Packages.props exists.
https://github.com/NuGet/NuGet.Client/pull/5572
We actively negate this here, as we have some packages in tree we don't want such automatic behavior for.
We use Directory.Build.props to get copy the state *after* our MSBuild config but before Nuget's config.
-->
<ManagePackageVersionsCentrally />
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="BenchmarkDotNet" Version="0.13.12" />
<PackageVersion Include="DiscordRichPresence" Version="1.2.1.24" />
Expand Down

0 comments on commit 799702b

Please sign in to comment.