Show diagnostic nodes in multi-targeting projects
Normally a given project will only show a single set of analyzer nodes, and finding those nodes and mapping to their underlying `AnalyzerReference`s is relatively easy. When a project has multiple target frameworks, however, things get harder. Instead of a one-to-one mapping from projects in hierarchy to projects in the workspace, we have a one-to-many mapping: there will be one Roslyn project **per target framework** per hierarchy project. There are a few pieces to making this work properly: 1. When we have found a hierarchy item for an analyzer we already walk up the hierarchy to find the node for the project. We modify this to also look for the node representing the particular target frameworks (that is, with a "TargetNode" capability), if any, and extract the TargetFrameworkMoniker. 2. The `IHierarchyItemToProjectIdMap` has been updated to take that TargetFrameworkMoniker as an optional argument. 3. When checking the hierarchy associated with each Roslyn project we now extract and compare its TargetFrameworkMoniker, if desired.
Showing
想要评论请 注册 或 登录