Nuget: Migrating multiple large Solutions to PackageReference

有些话、适合烂在心里 提交于 2020-04-07 03:49:33

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!