NuGet / Home

Repo for NuGet Client issues
Other
1.49k stars 250 forks source link

Add support for solution level PC -> PR migration #5879

Open nkolev92 opened 7 years ago

nkolev92 commented 7 years ago

Implement the solution level project walking strategy for the PC -> PR migration.

Example, for a project graph like the following:

A -> B -> C B -> D -> E F

Migrate firstly the leaf projects, because the result of their restore will impact the referencing projects too.

So restore, C, E, F first. Then restore D, B and lastly A.

karann-msft commented 5 years ago

recently when an enterprise customer attempted to move to Package Ref, they had a lot of pain doing this one project a time with 1400 projects. I believe this is representative of the enterprise customer experience in general.

nkolev92 commented 5 years ago

A healthy amount of work on this PR was done by @jainaashish already in https://github.com/NuGet/NuGet.Client/pull/2122.

We can revisit that when we get back to this issue.

astrohart commented 3 years ago

Absolutely want to upvote this. While I am not a customer at a large enterprise per se, I am working on doing AI with C# and I have a solution that is approx 200 projects or so.

Wanted to definitely give this issue my thumbs up. I think having to right-click each of the 200 projects is tedious and time consuming. This definitely should be scriptable/iterable.

astrohart commented 3 years ago

A healthy amount of work on this PR was done by @jainaashish already in NuGet/NuGet.Client#2122.

We can revisit that when we get back to this issue.

Totally, totally, TOTALLY want to see this implemented yesterday, by noon! :-)

AceOubahaTLI commented 1 year ago

Upvote - migrating dozens of packages across multiple solutions and this would greatly help.

zivkan commented 1 year ago

Note that NuGet's packages.config to PackageReference migration doesn't convert non-SDK style projects to SDK style. It only changes the package restore style for the project.

.NET's Upgrade Assistant does the project format conversation as well, has a solution upgrade feature, and appears to support upgrading from packages.config. So, anyone not specifically wanting to remain on the non-SDK style project should consider trying upgrade-assistant. SDK style projects can target .NET Framework, although I haven't used Upgrade Assistant myself so I don't know if it has an option to just convert the project file. It if does update to a newer TFM, it should be a 1 line change to re-targets the SDK style project back to .NET Framework. There's also a try-convert tool, but it doesn't get updated as much as Upgrade Assistant, so I don't know what its status is.

Anyway, these tools aren't a 100% replacement for NuGet's solution PC->PR upgrade, as some projects need to stay non-SDK style. But many projects will have no issues converting to SDK style, so these are tools that can be used today to achieve a better outcome than NuGet's PC to PR migration.