dotnet/roslyn
[MSBuildWorkspace] ProjectReferences vs. AllProjectReferences return the same count despite projects not existing in the solution.
Offen
#46.113 geöffnet am 17.07.2020
Area-IDEConcept-Continuous ImprovementIDE-MSBuildWorkspacehelp wanted
Repository-Metriken
- Stars
- (20.414 Sterne)
- PR-Merge-Metriken
- (Durchschn. Merge 6T 17h) (256 gemergte PRs in 30 T)
Beschreibung
Version Used: master, 16.6.0, etc
Steps to Reproduce:
- Create a project A and a project B
- Have A reference B
- Create a solution X and add only A to it
- Use
MSBuildWorkspaceandOpenSolutionAsync() - Compare A's
ProjectReferencestoAllProjectReferences
Expected Behavior:
They should be different, because solution X only has A in it.
Actual Behavior:
They are the same because the way a solution is loaded causes project references to be loaded into it even if they're not actually in the solution. See here: