In this post we’ll learn about “How to identify the project dependencies in Visual Studio?”. In the previous post you have seen the difference between Build and Rebuild solution in Visual Studio and how things work under the hood. In the last section of the post, we also talked about the project dependencies and the build order of the projects, which is dependent on project dependencies.  In this post let’s have a quick look how you can view the project dependency in Visual Studio.

To view the Project Dependencies, Right Click on the Solution and select “Project Dependencies…” as shown in the image below.

01 How to identify the project dependencies in Visual Studio - https://codeconfig.in

This will bring the “Project Dependency” dialog window where you can view the dependencies for the selected project.  Select the project from the “Projects” dropdown to see the related dependent projects.

21 How to identify the project dependencies in Visual Studio - https://codeconfig.in

As appearing in the above pictures all the dependent projects are “Checked”.

There is another alternative way to get these details, right click on the solution in Solution Explorer, choose Property from the context menu, and then select Project Dependencies.

81 How to identify the project dependencies in Visual Studio - https://codeconfig.in

You can also visualize the dependency of projects using Code Map and I personally prefer this options.  In this case, you don’t need to select individual projects from the dropdown to verify the dependency; as this provides a complete view of dependencies.  The generated code map can display all  the dependency references together.

Navigate to Architecture –> “Generate Code Map for Solution

101 How to identify the project dependencies in Visual Studio - https://codeconfig.in

This will generate the nice dependency diagram for the projects. As shown in the below images, you can see how the projects / libraries are dependent on each other in a single view.

121 How to identify the project dependencies in Visual Studio - https://codeconfig.in

You can further explore to each node to get more inside of the each and individual elements of projects.

You can check more article on our website under C# section HERE or you can also check same on Micrsoft Docs too.

Leave a Reply

Your email address will not be published. Required fields are marked *

Explore More

How To Fix Azure Functions Timer Trigger Unable to Start Running Locally with Vs2022 17 2 X Azurite

Lately my VS2022 (17.2.x) Azure Functions projects started failing to run locally. The local console had errors related to not being able to start any of the Timer Triggers. The

Solve undeclared prefix error on XElement.Load()

Let’s check below how to solve undeclared prefix error on XElement.Load(). In order to use a namespace prefix (such as addthis:), the namespace must be declared, by writing xmlns:addthis=”Fixed URI”.

How to get the nuget cache folder location programmatically

While programming if I need to get from a .NET app (not .NET Core app) the list of directories where NuGet stores its packages. Let’s see how to do this.