JetBrains Rider 2023.3 Help

Explore type dependency diagram

JetBrains Rider allows you to visually study how types depend on each other in your solution. You can add any number of types from different projects or compiled assemblies to the type dependency diagram and study different kinds of dependencies between them.

Build the initial diagram

  1. In the solution explorer, select the desired files, folders, and projects.

  2. Right-click the selection and choose Tools | Show Type Dependency Diagram in the context menu.

The newly created type dependency diagram is displayed in a new editor tab.

Note that the diagram is not synchronized with the solution, that is if you rename or delete types in your code, the diagram is not changed.

Adjust the view of the diagram

To pan the diagram, right-click anywhere in the diagram area outside the diagram items and drag while the hand cursor cursor_cross.png is shown. For zooming, use the mouse wheel while holding down the Ctrl key .

The diagram layout is calculated automatically, but you can change it if necessary: all items can be moved. To move an item (a type, a dependency link, or a grouping item), first click it to select, and then click and drag it while the cross cursor cursor_cross.png is shown.

When a large diagram is zoomed out and its elements become small, press and hold Alt while hovering over the diagram to magnify specific areas.

Study specific types and containers

You can get the detailed information on any specific type (as well as on any dependency between types). To get details of a type, hover over it, and as soon as the details popup appears, move the mouse pointer on it.

On the type details popup, you will see which types the given type uses, where the type is used, inherited types, types use in constructor parameters and more.

If the type has XML documentation, the summary is also displayed on the popup.

You can click related types to open their declarations in the editor. To open the type itself in the editor, click Go to declaration next to its name.

Details of specific type on the dependency diagram

Study dependencies between types

On the type dependency diagram, you can visualize several kinds of dependencies. To show or hide specific kinds of dependencies, use the corresponding buttons on the diagram toolbar:

  • Aggregation Dependencies — Displays a kind of dependency when a type is a collection or container of other types,

    This kind of dependency is shown as a green dotted line. Name of the corresponding field is shown next to the line. You can hover over this line to see the field declaration and navigate to the corresponding place in the editor.

  • Usages Dependencies — Displays a kind of dependency when variables, parameters, or method returns of one type are used in another type.

    This kind of dependency is shown as a blue line whose thickness reflects a relative number of usages. You can hover over this line to see the list of usages:

    JetBrains Rider: Usage dependency

    Clicking on specific usages will bring you to the corresponding place in the text editor, clicking on the Show all usages link opens all usages in the Find window.

  • Inheritance Dependencies — Displays a kind of dependency when one type extends or implements another type. This kind of dependency is shown as a dark green line. You can hover over this line to see the inheritance relation and navigate to the corresponding place in the editor.

  • Return Type Dependencies — Displays a kind of dependency when one type has methods or properties that return another type. This kind of dependency is shown as a violet line. You can hover over this line to see the list of members .

  • Constructor Injection — Displays a kind of dependency when one type is exposed as a constructor parameter of another type. This kind of dependency is shown as a brown line. You can hover over this line to see the constructors .

Last modified: 21 March 2024