Find usages of resource functionality, how to?


We are testing 5.0 and I have already started the process of pushing our upgrade through management because I think the new features are great. We do deal with internationalization a fair bit and over the years have accumulated a significant amount of localizable resources in our projects. In particular, strings. I have been meaning to find un-used resources for a while, but from my limited knowledge of VS, I thought it was a mostly manual process. We were very excited to see the Find usages of resource functionality be added to 5.0. That, right there, will pay for the the upgrade in about 2h if we can find all unused resources.
First question is: Can we add to the code analysis for a project/solution rules or something to report unused resources? (or is it already there and I missed it?)
Second, if the answer to the first one is NO, then, how do I use the Find usages of resource functionality? I opened a resource file in the IDE with the resource editor and I tried right-clicking on string resources to no avail. Any suggestion is welcomed.


vs2008 Pro, R#R 5.0.1565.10

1 comment
Comment actions Permalink

I recomend you to set Xml Editor as default editor for resx files because ReSharper 5.0 shows errors and warnings in xml editor

Also use ReSharper | Windows | File Structure or Xml Editor for

  • Navigate to resource entries by Go To File Member (Ctrl+F12)
  • Find resource usages
  • Refactor resource entries
  • Apply quick fixes or context actions

ReSharper 5.0 doesn't have "Find unused resource" but now you could use "Safe delete" for removing unused resources. The our tool "ReSharper | Tools | Edit Resource Value" available from resource usage and declaration.


Please sign in to leave a comment.