You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Update NuGets included through Directory.Build.propsΒ #10850
[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)
Reacted by Maksym Koshovyi, Alex Vincent, Eduardo CΓ‘ceres, Anton, Nirmal Guru, Brandon Hurler, Johannes HΓΆhn, Eli-Black-Work, rstedman, pwinstead and 9 more
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!
I don't see how this would work nowadays. When using VS NuGet manager it only shows the projects and while the version number is correct for those using global references, it only updates the versions of projects and does not even show the global reference in the .build.props file. So I can update individual projects but never the build.props references.
I wonder why that is still not supported properly.
My assumption is that NuGet itself supports it but Visual Studio does not. Legit since it's in the NuGet repository - but it's also tagged with VisualStudioUI so I assume this is the right place to mention that it's still not supported.
Likely too niche again for anyone to care implementing this :(
Activity
nkolev92 commentedon May 20, 2021
fyi @JonDouglas - Something to be aware of.
f2calv commentedon Aug 19, 2021
Example repo here https://github.com/f2calv/vs-nuget-issue
Nirmal4G commentedon Jun 21, 2022
You could give the user either the choice of updating the file in which the
PackageReference/PackageVersion/GlobalPackageReference/CentralPackageReferenceandPackageDownloadwere 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 commentedon Aug 21, 2022
/cc @martinrrm @jeffkl to consider for 17.4+
jeffkl commentedon Aug 29, 2022
Related to #9018
CzBuCHi commentedon Jul 7, 2024
Its almost 2 years ... so any updates on this?
danmusk commentedon Aug 8, 2024
Instead of
Directory.Build.propsmaybe we should useDirectory.Packages.propsRef: https://learn.microsoft.com/en-us/nuget/consume-packages/central-package-management
nkolev92 commentedon Aug 8, 2024
Updating Directory.Packages.props works today, so if you're using CPM, that should already work.
Skyppid commentedon Sep 30, 2026
I don't see how this would work nowadays. When using VS NuGet manager it only shows the projects and while the version number is correct for those using global references, it only updates the versions of projects and does not even show the global reference in the .build.props file. So I can update individual projects but never the build.props references.
I wonder why that is still not supported properly.
My assumption is that NuGet itself supports it but Visual Studio does not. Legit since it's in the NuGet repository - but it's also tagged with VisualStudioUI so I assume this is the right place to mention that it's still not supported.
Likely too niche again for anyone to care implementing this :(