I'm trying to disentangle a lot of heavily interdependent types in one of my company's .NET assemblies.
It seems like the first step would be to take a couple of classes and look at which members of each cause them to be interdependent.
How can I do this with NDepend? If I have TypeA and TypeB, what CQLinq can I write to ask for all the methods in TypeA that use TypeB, and all the methods in TypeB that use TypeA?
First you can use this query to match all types interdependent (you might need to increase the CQLinq run timeout since it is a O(nbTypes^2) query)
Then for each pair, you can export both types to matrix column and row as shown on the screenshot. Then right click the black cell (black coz types are interdependent), click Open this dependency
then click this menu
et voilà, the culprit is now obvious
btw the first query can be refined this way, and methods groups matched in the query result can be also exported to matrix in a right-click menu
Related doc to deal with dependencies: