NuGet / Home

Repo for NuGet Client issues
Other
1.5k stars 253 forks source link

[Feature]: Add support for central package management to Visual Studio Package Manager UI for legacy projects #9521

Open cristinamanum opened 4 years ago

cristinamanum commented 4 years ago

Details about Problem

Implement the back-end changes to support Visual Studio update scenarios for non-sdk projects.

cremor commented 1 year ago

Is this not yet implemented? For legacy projects the VS Package Manager UI adds <Version> tags to the .csproj file instead of updating the Directory.Packages.props file.

(I know that this issue is still open. But I'm asking because the related issue #9018 is also still open, but works in VS.)

Ozzian commented 6 months ago

When you have mixed projects in your solution, this now breaks the CPM: the Directory.Packages.props is updated AND the legacy projects are polluted with the <Version> tags.

exaiwitmx commented 2 months ago

For legacy projects the VS Package Manager UI adds <Version> tags to the .csproj file instead of updating the Directory.Packages.props file.

I also experience the same behavior (in a solution which contains legacy projects (non-SDK-style) only).

Reading the documentation, one might come to the conclusion that all this should already work:

The feature is available across all NuGet integrated tooling, starting with the following versions.

[Visual Studio 2022 17.2](https://visualstudio.microsoft.com/downloads/)
[.NET SDK 6.0.300](https://dotnet.microsoft.com/download/dotnet/6.0)
[nuget.exe 6.2.0](https://www.nuget.org/downloads)

Older tooling will ignore central package management configurations and features. To use this feature to the fullest extent, ensure all your build environments use the latest compatible tooling versions.

Central package management applies to all -based MSBuild projects (including legacy CSPROJ) as long as compatible tooling is used.