问题描述
背景
我正在处理一个包含多个大型解决方案的大型项目.总而言之,我们有超过 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!