cyclonedx-dotnet icon indicating copy to clipboard operation
cyclonedx-dotnet copied to clipboard

Fix null reference in project reference resolving

Open JanKrivanek opened this issue 1 year ago • 0 comments

Problem:

ProjectFileService relies on ProjectReference msbuild item to allways have Include attribute.

That however doesn't need to be present in some special cases (Update or Remove attributes are possible as well - see e.g.: https://github.com/dotnet/runtime/blob/main/eng/references.targets#L19).

Solution:

Skipping the items without include attribute. In ideal case the Remove should be special case handled as well - but that's outside of scope of this change

JanKrivanek avatar Jul 13 '22 17:07 JanKrivanek