问题
Background
I'm working on a big project with multiple large solutions. All in all we have over 400 C#-Projects. In the past we used Nuget with the packages.config
file for our dependencies. Now we want to migrate all of the projects to the new PackageReference
format.
Problem
I know Visual Studio provides a solution for migrating a single project from packages.config
to the PackageReference
format, but I'm not aware of a solution where I can migrate multiple Visual Studio Solutions at once. I don't need the compatibility check of Visual Studio, because all used packages are compatible with the new format.
Question
Is there a convenient way of migrating multiple Visual Studio Solutions at once from packages.config
to the PackageReference
format?
回答1:
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:
Hope this helps.
来源:https://stackoverflow.com/questions/52272698/nuget-migrating-multiple-large-solutions-to-packagereference