Incorrect dependency structure on different target framework
A dependency may reference different dependency versions based on the project's target framework. When scanning a solution where two projects with different target frameworks reference the same dependency, the generated SBOM may incorrectly label a transitive dependency as a direct dependency.
Steps to reproduce
- Given a fresh solution
- Add a net6.0 project (P1)
- Let P1 reference
[email protected] - Add a net8.0 project (P2)
- Let P2 reference
[email protected] - Generate an SBOM for the solution
Result
This issue is stale because it has been open for 3 months with no activity.
Thanks for reporting and the creation of the test case.
Solution scan is always a little fuzzy, but I agree it should be:
This is tricky, however. Currently, a dictionary is used for dependencies, where the name is used as key. I plan some bigger refactors over the year, when does happen this will likely be fixed too.