[WIP] [Suggestion] Adding the ability to simulate a package update #1649
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this?
A new command line option for "nuget update", which lets a user simulate rather than actually perform the update. It's similar to the "-whatif" option which is already available in some of the PMC cmdlets.
When this option is included, nuget will not make any modifications. Instead, it will print the package name, the currently installed version, and the version it would update to (taking into account whether the user has opted into prelease packages). If a package installation brings in any new dependencies, the user will be informed about a new package install rather than a version update.
Why?
We have often wanted to be able to run CI tasks that report on packages being out of date, or report on new major version availability, etc. In some cases, we’d even like to fail a build if a package is no longer up to date. We cannot currently do this because the existing cmdlets can only run within the context of Visual Studio’s Package Management Console.
Is this PR 100% ready?
No. While I've scanned the wiki, I'm not very familiar with the codebase, so apologies in advance for violations of style, convention, architecture, etc.
I really just wanted to show this to determine if there would be an appetite to include this as a feature addition? If so, I can raise an issue to associate it with, write any appropriate tests, refactor, etc.
Thanks for spending the time to read this!