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
fix: resolve version-range bom-ref crash when scanning multi-project solutions
When a package's nuspec declares an exact-range dependency (e.g. [1.0.0])
and the project that consumes it has resolved a higher version of the same
package directly, NuGet stores the range string verbatim in project.assets.json.
ResolveDependencyVersionRanges cannot resolve it within that project's assets
(2.0.0 does not satisfy [1.0.0]), leaving the range unresolved.
In a multi-project solution where another project resolves 1.0.0, the merged
BOM contains both versions. The name-only fallback in Runner.cs then finds two
candidates and crashes with 'Unable to locate valid bom ref for X [1.0.0, 1.0.0]'.
Fix: when the name-only fallback finds multiple candidates and dep.Value is a
parseable VersionRange, use the range to select the single satisfying candidate
before falling back to the error path.
Adds a two-project E2E regression test that reproduces the exact topology from
the issue report and asserts both the tool succeeds and the dependency edge
points to the correct version.
0 commit comments