matori82
matori82

Reputation: 3839

How to find and remove all unused resources in Visual Studio 2010?

Is there a way to find all unused resources (those that have x:Key attribute set)? By resources I mean the WPF/XAML objects created in ResourceDictionary. This is WPF/XAML specific question, not related to .resx files or other kind of resources such as images or binary files.

I have been working on a project for a while and was testing some different styles for same controls but during the time everything got mixed up so I'd like to remove all resources not used anymore.

Upvotes: 2

Views: 2394

Answers (1)

Bernard
Bernard

Reputation: 7961

You could do a file search (using Find in Files) across your solution for each of your named resources. Not very elegant, but it will do the job.

See this question for some assistance in finding all of the resources in your application.

Upvotes: 1

Related Questions