R# 5.x - best practice for identifying (and ideally removing) unused references in a project?

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)?


Thanks, everyone!

3 comments
Comment actions Permalink

is there anything I can do/change to make it more likely that this question gets a reply?  Is there something I left out that I should have included?

Thanks!

0
Comment actions Permalink

Hello James,

I'm sorry, looks like I missed your message. At the moment, using 'Find dependent
code' is still the only way to find unused assembly/project references. Also,
I'm not aware of a plug-in for ReSharper that would provide such functionality.
You're welcome to vote for the following requests: http://youtrack.jetbrains.net/issue/RSRP-118734
and http://youtrack.jetbrains.net/issue/RSRP-6312. We will certainly consider
this feature for one of the future releases. Thank you!

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

is there anything I can do/change to make it more likely that this
question gets a reply?  Is there something I left out that I should
have included?

Thanks!

---
Original message URL:
http://devnet.jetbrains.net/message/5277097#5277097



0
Comment actions Permalink

If it's any consolation, I have the same question... +1


"James Manning"  wrote in message
news:21369404.103421289237230141.JavaMail.devnet@domU-12-31-39-18-36-57.compute-1.internal...

is there anything I can do/change to make it more likely that this question
gets a reply?  Is there something I left out that I should have included?

Thanks!

---
Original message URL: http://devnet.jetbrains.net/message/5277097#5277097

0

Please sign in to leave a comment.