Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New projects using VS Templates should detect CPM in target solution #13810

Open
oising opened this issue Sep 26, 2024 · 4 comments
Open

New projects using VS Templates should detect CPM in target solution #13810

oising opened this issue Sep 26, 2024 · 4 comments
Labels
Area:RestoreCPM Central package management Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Type:Feature

Comments

@oising
Copy link

oising commented Sep 26, 2024

NuGet Product(s) Involved

Visual Studio Package Management UI

The Elevator Pitch

If I create a new project using an OOTB template in Visual Studio 2022, it fails to take into account solutions that are using Centralized Package Management (CPM.)

I'm not sure how smart this needs to be -- should it scan Directory.Packages.props and look for possible issues (i.e. wanted packages are already there, but are possibly problematic according to semver rules) It seems that some scanning would be required to see if the packages exist or not and if so, are they semver compatible with the desired versions. Then the templates need some metadata associated too. Huh. This is getting complicated :)

Additional Context and Details

No response

@oising
Copy link
Author

oising commented Sep 27, 2024

@davidfowl This makes adding Aspire Orchestrator support to an existing solution via VS very painful too.

@JonDouglas
Copy link
Contributor

@martinrrm / @jeffkl any initial thoughts on making this work w/ cpm-enabled solutions?

@jeffkl
Copy link
Contributor

jeffkl commented Sep 27, 2024

At the moment, various teams own their templates. We would need to get every single project template owner that uses packages to update their templates. I'm not sure how it would work programmatically to detect if CPM is enabled and such. I think ideally template owners would just specify the list of packages and project system would set them up via APIs that go through a common place that knows if CPM is enabled or not. The biggest involvement would be for project system here, NuGet doesn't actually edit any projects.

@jeffkl
Copy link
Contributor

jeffkl commented Sep 27, 2024

I'm leaving this open but its sort of a duplicate of dotnet/templating#6187

@jeffkl jeffkl added Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Area:RestoreCPM Central package management and removed Triage:Untriaged labels Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:RestoreCPM Central package management Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Type:Feature
Projects
None yet
Development

No branches or pull requests

3 participants