开发者

Finding usages of a method in multiple Visual Studio solutions

开发者 https://www.devze.com 2023-03-16 16:18 出处:网络
Suppose I have a Visual Studio solution called MySolution. MySo开发者_StackOverflowlution contains a project with a public method defined like this: public void MyMethod(){...}.

Suppose I have a Visual Studio solution called MySolution. MySo开发者_StackOverflowlution contains a project with a public method defined like this: public void MyMethod(){...}.

If I have Resharper installed I can find the usages of MyMethod in MySolution by right clicking it and choosing Find Usages. However, suppose I have a number of other Visual Studio solutions on my hard drive which may or may not make use of MyMethod. Is there a simple way to track down these usages?

EDIT: Here's an attempted clarification of what I'm looking for. Suppose we have two other solutions MySolution2 and MySolution3. Each of these solutions contains a number of projects. Some of these projects may reference the assembly containing MyMethod. Let's call these projects referring projects. Some of the referring projects may actually make direct use of MyMethod. Let's call these projects client projects. I'm both interested in finding the referring projects (less ambitious) and the client projects (more ambitious).


How would the other solutions make use of MyMethod other than having its containing assembly referenced in the end? If you mean is there a way to know if a particular method from a particular assembly referenced from a particular project is actually used in this project or not, then no, to my knowledge there's no way to do that other than going to each of these solutions, jumping to the method (say, with ReSharper's Go to symbol) and searching for its usages.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号