Reputation: 6349
I have a solution which has two projects Project1 and Project2. Project1 refers to Project2. Project2 has a number of methods/functions that is used across different classes inside Project1. How can find out all the methods/functions of Project2 that are used in Project1?. I am using Visual Studio 2012.
I am using .NET framework 4.0 and C#
I have already read the thread the following thread, which is related to an assembly (possibily without source code) https://stackoverflow.com/questions/25606360/how-to-find-out-wich-methods-from-an-assembly-are-being-used-in-another-assembly
Edit
The answers suggest that I use tools like ReSharper and NDpend. These are not free tools, even though it might meet my need. I do not want to spend big money for such a small feature.
Upvotes: 0
Views: 1184
Reputation: 59228
NDepend is a great tool for tasks like this. It e.g. provides a dependency matrix which you can expand/collapse:
Image from NDepend homepage
Upvotes: 1
Reputation: 5890
Remove reference to Project2 from Project1. Then go through the error list and you'll get the methods.
EDIT: you can use Resharper, which can find all usages of project (and of a class, a method ...)
Upvotes: 0
Reputation: 619
Right-click on solution, choose Project Dependencies, choose the first project in the Projects drop down list, and scroll over projects.
It's easier using Resharper:
Right-click on module and choose Project Hierarchy, then click Referencing projects to see all project references
Upvotes: 0
Reputation: 64933
There's a extremely simple solution for this: remove the reference of Project2
on Project1
and build Project1
. You'll instantly get all classes that aren't present in Project1
but in Project2
as build errors.
Upvotes: 0