Skip to content

DependentProjectsFinder.GetAssemblyReferenceType might perform unnecessary binding #41358

@sharwell

Description

@sharwell

The DependentProjectsFinder.GetAssemblyReferenceType method obtains an assembly or module symbol here:

if (compilation.GetAssemblyOrModuleSymbol(reference) is IAssemblySymbol symbol)

This symbol is passed to a predicate, where the only actual use of this predicate is the following:

a => a.Name == assemblyName ? true : (bool?)null,

The HasReferenceToAssembly method should be updated to avoid requiring symbol binding to check the name of an assembly.

🔗 Originally discovered while investigating internal issue DevDiv 1006914.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-IDEBugConcept-OOPRelated to out-of-procUrgency-Soonhelp wantedThe issue is "up for grabs" - add a comment if you are interested in working on it

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions