Home

CentralPackageVersions

CentralPackageVersions, also known as Central Package Versions, is a pattern in NuGet Central Package Management that centralizes the version numbers of NuGet packages used by multiple projects in a solution. The aim is to reduce version drift and simplify updates by maintaining a single source of truth for package versions.

Typically, a central file named Directory.Packages.props at the repository root holds the configuration. The file declares

The central file is checked into source control and updated to bump versions in one place, which

Benefits of CentralPackageVersions include easier management of package updates, reduced risk of conflicting versions across projects,

Limitations and considerations include the requirement for SDK-style projects and tooling that supports central package management.

See also: NuGet, Central Package Management, Directory.Packages.props.

a
set
of
package
versions
using
PackageVersion
items,
for
example
including
entries
for
a
package
ID
and
its
version.
Projects
in
the
solution
then
reference
these
packages
without
specifying
a
version,
or
rely
on
the
central
version,
allowing
the
build
to
resolve
the
version
from
the
central
file.
propagates
to
all
projects
consuming
the
same
packages.
This
approach
helps
ensure
consistency
across
projects
and
improves
reproducibility
in
builds
and
CI
pipelines.
and
cleaner
project
files
since
version
numbers
are
centralized.
It
also
supports
faster,
more
predictable
upgrades,
and
smoother
collaboration
when
multiple
teams
work
on
the
same
solution.
Some
project
types
or
older
tooling
may
not
support
it,
and
careful
handling
of
transitive
dependencies
may
still
be
necessary.
Keeping
the
central
file
in
version
control
and
communicating
policy
for
upgrades
is
advised.