Back in 2006 there was a thread about finding the unused references in a project which said basically to go through each reference and use 'find code dependent on module' on that reference.
Since it's been 4+ years since then, I was wondering if there was a better answer these days? I understand it's still based on a static analysis, but that's fine :) I'm trying to shrink the xap file for a Silverlight project, FWIW
Ideally I'd love something that showed the list of references in the project with each one listing:
- If any code in the project is using it (showing the code like the 'find code dependent...' feature would be nice, too
- which, if any, other project references depend on it (for instance, System.ServiceModel.Web depends on System.ServiceModel or the like)
Bonus points if the operation shows the list of likely unused project references and offers to go through the cycle of 'rebuild project (initial to verify it's in a valid state), remove first, rebuild project, remove second, rebuild project, etc' (obviously, stops when/if the build fails :))
- What's the best R# 'in the box' option for this?
- What, if any, R# plugins address this (or help in the process)?
- If such a plugin doesn't currently exist, could someone familiar with the plugin API state what they feel would be the relative difficulty in creating such a plugin in terms of leveraging the R# 'dependent code' functionality (as an API, presumably)?