How to remove unused resources?

2

Is there any way or extension of Visual Studio that makes it possible to search for unused resources in the application?

    
asked by anonymous 11.03.2015 / 12:01

2 answers

3

The solution I found was to use RESX Utils .

Because this solution was not working properly, few modifications to the source code solved the problem.

The applied solution:

RESX Utils uses only the resource key as a search parameter, so I changed it to use this way: namespaceResx . nomeClasseResx . keyResx ;

With this, it searches correctly on all selected files as a filter on the main screen.

    
12.03.2015 / 13:27
0

You can use Resharper from Jetbrains , but the process is not fully automated.

1- Access the Resources.Designer.cs class 2- Within this class there will be a property for each feature of your project, just click on each one with the right button and go to "Find usages" or "Find usages advanced" 3- If no reference is found, you can delete the resource.

With this method you can use Visual Studio's own search too; if you do not find any records you can delete the feature.

    
11.03.2015 / 13:14