Nuget:将多个大型解决方案迁移到PackageReference [英] Nuget: Migrating multiple large Solutions to PackageReference

查看:517
本文介绍了Nuget:将多个大型解决方案迁移到PackageReference的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

背景

我正在处理一个具有多个大型解决方案的大型项目.总而言之,我们有400多个C#项目.过去,我们将Nuget与packages.config文件一起用于依赖项.现在,我们希望将所有项目迁移到新的PackageReference格式.

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.

问题

我知道Visual Studio提供了将单个项目从packages.config迁移到PackageReference格式的解决方案,但是我不知道可以在其中迁移多个Visual Studio解决方案的解决方案立刻.我不需要Visual Studio的兼容性检查,因为所有使用的软件包都与新格式兼容.

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.

问题

是否有一种方便的方法将多个Visual Studio解决方案一次从packages.config迁移到PackageReference格式?

Is there a convenient way of migrating multiple Visual Studio Solutions at once from packages.config to the PackageReference format?

推荐答案

Nuget:将多个大型解决方案迁移到PackageReference

Nuget: Migrating multiple large Solutions to PackageReference

为了确保迁移的准确性,Visual Studio和大多数扩展都提供了将单个项目从packages.config迁移到PackageReference格式的功能,并将执行Visual Studio的兼容性检查.

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.

如果您希望立即迁移多个Visual Studio解决方案,即AFAIK,则目前没有此类方法或扩展名.

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包引用更新程序

这可以将具有多个大型项目的单个解决方案从package.config一次迁移到PackageReference格式.只需右键单击 Solution Explorer 中的 Solution ,然后单击升级到程序包引用:

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:

希望这会有所帮助.

这篇关于Nuget:将多个大型解决方案迁移到PackageReference的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆