Nuget: Migrating multiple large Solutions to PackageReference(Nuget:将多个大型解决方案迁移到 PackageReference)
问题描述
背景
我正在处理一个包含多个大型解决方案的大型项目.总而言之,我们有超过 400 个 C# 项目.过去,我们将 Nuget 与 packages.config 文件一起用于我们的依赖项.现在我们要将所有项目迁移到新的 PackageReference 格式.
问题
我知道 Visual Studio 提供了将 single 项目从 packages.config 迁移到 PackageReference 格式的解决方案,但我没有知道我可以一次迁移多个 Visual Studio 解决方案的解决方案.我不需要 Visual Studio 的兼容性检查,因为所有使用的包都与新格式兼容.
问题
有没有一种方便的方法可以一次将多个 Visual Studio 解决方案从 packages.config 迁移到 PackageReference 格式?
Nuget:将多个大型解决方案迁移到 PackageReference
为确保迁移的准确性,Visual Studio 和大多数扩展都提供将单个项目从 packages.config 迁移到 PackageReference 格式,并将执行Visual Studio 的兼容性检查.
如果您想一次迁移多个 Visual Studio 解决方案,AFAIK,目前没有这样的方法或扩展.
作为解决方法,我想为您提供一个扩展:
希望这会有所帮助.
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?
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.
这篇关于Nuget:将多个大型解决方案迁移到 PackageReference的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Nuget:将多个大型解决方案迁移到 PackageReference
基础教程推荐
- 获取C#保存对话框的文件路径 2022-01-01
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
- C# 9 新特性——record的相关总结 2023-04-03
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
- 如果条件可以为空 2022-01-01
- 从 C# 控制相机设备 2022-01-01
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
- 将数据集转换为列表 2022-01-01
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
