I am currently trying to use NDepend to identify (our) code that uses [Obsolete] marked members of a particular group of referenced assemblies (in my example starting with "Microsoft.TeamFoundation.*") and by "our code" I mean members of ours calling / using [Obsolete] members in said list of reference assemblies. Ideally I would get a precise list of our Type and their members but I would also be fine with just our types if I had the actual count of those [Obsolete] member usages inside those types
The idea is to do a one time analysis of the quantity of [Obsolete] member calls/usages we have, then integrate that into a CI pipeline going forward to track the reduction of that over time.
Any guidance or sample code doing something like that would be highly appreciated.
You can try this code query:
Thanks to calls to
Concat()this query handles both types and methods at the same time..ToHashSetEx()is used to speed up calls toIntersect().It works this way: