Nuget: Migrating multiple large Solutions to PackageReference

Nuget: Migrating multiple large Solutions to PackageReference

To ensure the accuracy of the migration, Visual Studio and most of the extensions are provide migrating a single project from packages.config to the PackageReference format and will perform a compatibility check of Visual Studio.

If you are want to way for of migrating multiple Visual Studio Solutions at once, AFAIK, there is no such method or extension at this moment.

As workaround, I would like provide you a extension:

NuGet PackageReference Updater

Which can migrate a single solution with multiple large projects from packages.config to the PackageReference format at once. Just right-click the Solution in Solution Explorer and click Upgrade to Package References:

enter image description here

Hope this helps.


I did not find the accepted answer much relevant, because the extension link is broken. I did see some repo containing a custom code to migrate, but it just did 1-1 substitution without eliminating the transitive dependencies - not good.

So, I have written my own something to automate the process of applying the built-in migration tool to all the non Asp.Net projects - https://github.com/MarkKharitonov/NuGetPCToPRMigrator

I used it to migrate a couple of hundreds projects across a few solutions.