Closed madelson closed 3 months ago
@madelson To what extent do you want to leverage CPM? If you take this to the extreme, you could imagine putting all NuGet packages in Directory.Packages.props
, even for those that are used only in one project (e.g. StackExchange.Redis
is used only in DistributedLock.Redis.csproj
). If you want to leverage CPM minimally, on the other hand, then you can also put only the common ones like Microsoft.SourceLink.GitHub
in Directory.Packages.props
.
Welp, turns out you can't leverage CPM "minimally." You'll get
error NU1008: Projects that use central package version management should not define the version on the PackageReference items
if you try to.
See https://learn.microsoft.com/en-us/nuget/consume-packages/central-package-management