Finding the Program that Calls a Specific DLL/method

458 views Asked by At

I have a DLL in Prod across dozens of programs. There is a method that is failing and writing to our event log with a non-specific error. We have a fix for the issue, but that would require a new DLL version and deploying to all of our applications that use that DLL. Additionally, it would require weeks of testing.

Searching source code has been unsuccessful so far because the method has a common name. How can I find the one program calling the method failing in the DLL?

Any input is much appreciated.

2

There are 2 answers

0
Eric J. On

If you're searching the source code and failing because the name is common, it sounds like you're doing a full-text search. If you are using Visual Studio, do the following:

  • Find any place the method is referenced in your code and place the cursor there.
  • Hit F12 to open the method (source code if the DLL project is part of the solution, otherwise in the object browser. It doesn't matter).
  • Right-click the method name (in source code or the object browser) and pick Find All References.

If you have multiple solutions, you'll need to repeat once for each solution.

1
Avi Meltser On

If you use ReSharper for Visual Studio, use Find Usages(Alt +F7) to see where that method is called.

If you have multiples solutions, use Total Commander text search to find all usages.