.NET › Assemblies & NuGet
What is Central Package Management (CPM) in NuGet, and how does Directory.Packages.props centralize version control?
AdvancedAnswer
Central Package Management lets you specify all package versions once in a repository-root Directory.Packages.props file, with individual project .csproj files referencing packages by name only (without a version), ensuring every project in a multi-project solution uses exactly the same version of any shared dependency, eliminating version drift across a large codebase.
<!-- Directory.Packages.props -->
<Project>
<PropertyGroup><ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally></PropertyGroup>
<ItemGroup>
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
</Project>
<!-- Individual .csproj: no version needed -->
<PackageReference Include="Newtonsoft.Json" />Real-world example A monorepo with 50 projects adopts Central Package Management so bumping a security-patched package version requires editing exactly one file instead of 50 separate .csproj files.