I need to analyze the usage of a specific library across 29 C# projects. This library is included via a *.dll file. The analysis should identify which methods from the library are used in each project.
Ideally, the analysis would be conducted without altering the code within the projects, although solutions that involve automated code modification will be considered.
Attempts So Far:
-
Parsing all methods in the library and then searching for them in each project.
Problem: there are methods in the projects with identical names as the ones in library, but aren’t from the library. -
Remove all library usings from the projects and observe errors that are given via MSBuild.exe. Problem: output of the MSBuild.exe does not contain IntelliSense output which would indicate that the method is coming from an external *.dll. E.g.,
Error CS0246 The type or namespace name 'XXXX' could not be found (are you missing a using directive or an assembly reference?)
- Remove library *.dll from the projects and try the same idea as in number 2. Same problem.
Is there a way to automatically append the full namespace to each method in the projects such that it results in “Library.Sublibrary.Class.MethodName”? Alternatively, are there other strategies?