Reputation: 558
Is there an easy way to find all references to the project in solution in VS2010? In fact I have a solution with 43 projects in it and I want to make sure there are no projects that have references to Project#N.
Thanks
Upvotes: 21
Views: 15342
Reputation: 8506
A few of these non-Resharper answers are good, but only work for certain project types and not others.
I do not have Resharper and DO have a mix of project types (NetStandard, .NET Core, .NET Framework, UWP) and here is a simple approach that worked for me:
First, unload the project of interest (in my example, TWW.Common.DataModel
).
Go to your Error List, select Entire Solution
, enable the display of Warnings, and in the search field, enter "The referenced component"*. It will filter the list to show all projects that now have this missing reference:
* or whatever text Visual Studio uses for this type of warning.
Upvotes: 0
Reputation: 6914
The build-in Project Dependencies command only works the other way, i.e., it finds a given project's dependencies, not projects dependent on the given one—unless of course you feel like selecting each of your 200 projects in turn in the dropdown, and then for each project, scrolling down the also voluminous list below to see if the project of interest is included.
Instead, in the absence of Resharper you can use Find in Files (CTRL
SHIFT
F
) to list projects in the solution that refer to the project of interest:
Upvotes: 15
Reputation: 1379
If you are lazy and do not have Resharper, you can also unload the project, try building the solution again and see wich projects fail building.
Upvotes: 8
Reputation: 7504
Easy but dull way: right-click on solution, choose Project Dependencies, choose the first project in the Projects drop down list, and use down arrow to scroll through projects. For each project in Project box look if your project of interested checked in the list - that's most probably will make your list.
Or you can use Resharper for this:
Upvotes: 34