'Check build dependency between source files in Visual Studio project

I have a legacy project that is requiring rebuilds of large portions of the code base just for touching the wrong source file, and I was hoping to refactor some bits of the code to stop this build cascade from leading to large build times.

In order to focus my development effort on high-impact points, I was hoping to take a look at the build dependencies between source files to identify high fan-in and high fan-out points.

With this in mind, does Visual Studio offer any functionality that allows developers to see a graph of all build dependencies between source files? I.e., determine which translation units will have to be rebuilt if I touch file X.



Solution 1:[1]

There are multiple ways to view project dependencies but one quick and simple way is to use a native feature of Visual Studio:

  1. Right click on the solution
  2. Choose "Project Dependencies..."
  3. Select the project from "Projects" dropdown to view it's dependencies

Choose Project Dependencies...

Select project to view dependencies

Another, more comprehensive, way would be to create a Code Map via Visual Studio (requires Enterprise edition).

Visual Studio, Enterprise Edition, Code Map

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1