Removing unused references.

RS is very good at highlighting and removing unused "using" statements.

I was wondering if it was possible that RS could also remove unused references from a project as well? After RS removes the "using" lines you sometimes have orphaned references that can also be removed which I do manually. It's not a problem if it can't but just in case it can could someone tell me how?

Thanks.

0
2 comments
Avatar
Permanently deleted user

Hello
     There's no 'Remove all unused references' as such, but you can right click each reference and run 'Find Code Dependent on Module'. If it doesn't find any code that uses the reference, you can safely remove it.

Andrey Serebryansky

Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Avatar
Permanently deleted user

I never knew about that Andrey. It works a treat. Many thanks.

0

Please sign in to leave a comment.