Repository navigation
Show what updating a package would change, from inside a solution - #80
Merged
Merged
Conversation
Checking an update meant knowing the version installed and the target framework it was compiled for, then spelling both out. In a solution, nuget X now compares the version the projects resolve with the latest stable release, and nuget X 2.0.0 with 2.0.0, using the lib/ folder each project compiles against, as project.assets.json records it. Two versions compare anywhere, as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In a solution,
assembly-differ nuget Polly 8.5.0compares the Polly version your projects resolve with 8.5.0, andassembly-differ nuget Pollycompares it with the latest stable release. Giving two versions still compares them anywhere.Prompt summary: Running assembly-differ in a local solution should give an easy way to validate an update:
nuget X 2.0.0shows what updating to X 2.0.0, from whatever is installed, would entail, with framework filters optional. This is also the agentic case: an agent can check an update with the tool instead of decompiling the assemblies itself.Why
To check an update, you had to know the version installed and which target framework it was compiled for, and spell out
nuget X <installed> <new> --framework <tfm>. People and agents had to dig both out of the project files or the restore output first.What
Versions from the solution
With fewer than two versions,
nugetreads every project in the directory, the same wayprojectsfinds them. Test and unpackable projects count too, because they use packages as well. It gets each project'sProjectAssetsFilefrom MSBuild, so custom output layouts work, and reads the version of the package each target framework resolves. One version is the version to update to. None means the latest stable release on the NuGet.config feeds.The framework each project compiles against
project.assets.jsonrecords the exactlib/(orref/) folder a project compiles the package against, so the comparison uses that folder, not a guess.--frameworkstill overrides it. Projects that resolve different versions or folders are compared one group at a time, and each group's line names its projects.Clear messages
A project that already resolves the version says so. If nothing has been restored, a warning names the projects and says to run
dotnet restore. If no project resolves the package, the message says how to compare two versions instead.Verify
Out of scope: Limiting the report to the members your code uses (
--uses) comes next. Every package with a newer version at once (upgrades) follows after that.🤖 Generated with Claude Code