Skip to content

Show what updating a package would change, from inside a solution - #80

Merged
Mpdreamz merged 1 commit into
mainfrom
nuget-in-solution
Nov 14, 2026
Merged

Mpdreamz merged 1 commit into
mainfrom
nuget-in-solution

Conversation

@Mpdreamz

Copy link
Copy Markdown
Contributor

In a solution, assembly-differ nuget Polly 8.5.0 compares the Polly version your projects resolve with 8.5.0, and assembly-differ nuget Polly compares 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.0 shows 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, nuget reads every project in the directory, the same way projects finds them. Test and unpackable projects count too, because they use packages as well. It gets each project's ProjectAssetsFile from 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.json records the exact lib/ (or ref/) folder a project compiles the package against, so the comparison uses that folder, not a guess. --framework still 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

mise run test
# NuGetInSolutionTests restore two projects against a local feed, at 1.0.0 and 1.1.0, then run nuget

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

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]>
@Mpdreamz Mpdreamz added the feature A new capability (minor bump) label Nov 14, 2026
@Mpdreamz
Mpdreamz merged commit c7ce997 into main Nov 14, 2026
6 of 7 checks passed
@Mpdreamz
Mpdreamz deleted the nuget-in-solution branch November 14, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature A new capability (minor bump)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant