Starting from Visual Studio 2017 Version 15.7 there is built-in support for migrating project from the packages.config management format to the PackageReference format.
The new format has some advantages like:
- Only top-level dependencies are listed
- Performance improvements thanks to the usage of a global-packages folder
To migrate from the old to the new format, right-click on a package.config file inside your project and choose Migrate package.config to PackageReference from the context menu.
This will load the following view:
It gives you a clear view of the identified top-level dependencies, any transitive dependencies and possible compatibility issues. If a package is accidently flagged as transitive you can still promote it to a top-level dependency by hitting the checkbox.
I’m currently in the process of migrating a big project and this makes my job so much easier!
More information: https://docs.microsoft.com/en-us/nuget/reference/migrate-packages-config-to-package-reference