Safe Delete Resource
If you are going to delete a resource, use the Safe Delete refactoring to ensure that the delete operation is safe. If there are no resource usages found, the resource will be deleted right away. Otherwise, ReSharper will show all resource usages, allowing you to edit the corresponding code. Removing usages marked with the icon, will lead to compilation errors.
To safe delete resource safely
Set the caret at the resource usage in a code file:
or at the resource name in a .resx file:
- On the main menu, choose or press Alt+Delete.
- If you have conflicts trying to safe-delete a resource, resolve them manually and click Refresh.
- When all conflicts are resolved and disappear from the dialog, click Next to apply the refactoring.
If ReSharper finds usages of resource in code files and but you apply the Safe Delete refactoring regardless of the conflicts, pay attention, that the resource declaration is deleted from resource files, while resource usages are left intact.