Describe the bug
When using Central Package Management (CPM) in .NET solutions, package versions are removed from project files (.csproj) and consolidated in a solution-level Directory.Packages.props file.
FOSSA does not currently seem to account for this setup. It treats the missing version numbers in .csproj files as if the latest package versions are being used, even though the actual versions are listed in Directory.Packages.props.
As a result, FOSSA resolves dependencies incorrectly. It merges the version-less PackageReference entries from .csproj files with other sources (such as project.assets.json), which can produce multiple detected versions.
Example
Given:
Directory.Packages.props specifies SomePackage version 8.0.0
.csproj contains <PackageReference Include="SomePackage" /> (no version)
FOSSA incorrectly reports both 8.0.0 and the latest version (e.g., 8.5.5) as being in use.
Expected behavior
FOSSA should respect the version information defined in Directory.Packages.props and not assume the use of the latest package version when versions are omitted from .csproj files.
Describe the bug
When using Central Package Management (CPM) in .NET solutions, package versions are removed from project files (
.csproj) and consolidated in a solution-levelDirectory.Packages.propsfile.FOSSA does not currently seem to account for this setup. It treats the missing version numbers in
.csprojfiles as if the latest package versions are being used, even though the actual versions are listed inDirectory.Packages.props.As a result, FOSSA resolves dependencies incorrectly. It merges the version-less
PackageReferenceentries from.csprojfiles with other sources (such asproject.assets.json), which can produce multiple detected versions.Example
Given:
Directory.Packages.propsspecifiesSomePackageversion8.0.0.csprojcontains<PackageReference Include="SomePackage" />(no version)FOSSA incorrectly reports both
8.0.0and the latest version (e.g.,8.5.5) as being in use.Expected behavior
FOSSA should respect the version information defined in
Directory.Packages.propsand not assume the use of the latest package version when versions are omitted from.csprojfiles.