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

Update NuGets included through Directory.Build.props #10850

Open
vsfeedback opened this issue May 11, 2021 · 8 comments
Open

Update NuGets included through Directory.Build.props #10850

vsfeedback opened this issue May 11, 2021 · 8 comments
Labels
Functionality:Install The install command in VS/nuget.exe Functionality:VisualStudioUI Priority:2 Issues for the current backlog. Type:Feature

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


[severity:It's more difficult to complete my work]
I have a Directory.Build.props file in solution folder that includes some NuGets in all of my projects. It works great, but when I'm updating said NuGets (by opening "Manage NuGet Packages for Solution"), VS just adds new version into all of the projects files and doesn't even update the original NuGet reference in Directory.Build.props.

Expected behavior is that VS updates version of PackageReference where that PackageReference is defined instead of creating a new one.

Some NuGets just needs to be added in all projects (like StyleCop or Xamarin.Forms), so it would be great if VS had a full support for such use case.

Currently I have to update version in Directory.Build.props manually.


Original Comments

Feedback Bot on 5/9/2021, 11:00 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.


Original Solutions

(no solutions)

@nkolev92
Copy link
Member

fyi @JonDouglas - Something to be aware of.

@f2calv
Copy link

f2calv commented Aug 19, 2021

Example repo here https://github.com/f2calv/vs-nuget-issue

@Nirmal4G
Copy link

You could give the user either the choice of updating the file in which the PackageReference/PackageVersion/GlobalPackageReference/CentralPackageReference and PackageDownload were declared or add the update to the projects not just the version but any metadata that can be changed via UI in VS IDE!

@JonDouglas
Copy link
Contributor

/cc @martinrrm @jeffkl to consider for 17.4+

@jeffkl
Copy link
Contributor

jeffkl commented Aug 29, 2022

Related to #9018

@CzBuCHi
Copy link

CzBuCHi commented Jul 7, 2024

Its almost 2 years ... so any updates on this?

@danmusk
Copy link

danmusk commented Aug 8, 2024

Instead of Directory.Build.props maybe we should use Directory.Packages.props

Ref: https://learn.microsoft.com/en-us/nuget/consume-packages/central-package-management

@nkolev92
Copy link
Member

nkolev92 commented Aug 8, 2024

Updating Directory.Packages.props works today, so if you're using CPM, that should already work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:Install The install command in VS/nuget.exe Functionality:VisualStudioUI Priority:2 Issues for the current backlog. Type:Feature
Projects
None yet
Development

No branches or pull requests

10 participants