Using NueGet packages and keep the versions upto date is a requirement as well as a challange if the versions are defined all over in many projects, in a given dotnet solution. We can limit the reference to packages to refer only in one project for a solution as consuming projects will inherently get the references. However, when it comes to using unit test projects we must reference the packages in all test projects to ensure test dicoverability in pipelines as well as in Test Explorer of the Visual Studio. Therefore, centralize Nuget Package management is essential in a complex and large solutions.
The Directory.Packages.props is the saviour for this requirement which allows us to define all the package versions centrally in the solution, by adding a Directory.Packages.props to the root of the repo, similar to using nuget.config.