ReSharper 8.0 Web Help

Code Cleanup lets you remove a number of code redundancies automatically, instead of navigating between code issues and removing them with quick-fixes.

To remove code redundancies using Code Cleanup
  1. Choose ReSharper | Options in the main menu.
  2. Open the Code Cleanup options: ReSharper | Options | Code Editing | Code Cleanup.
  3. Create a new profile as described in Creating Custom Profiles. In the Selected profile settings for the new profile, select Remove code redundancies.
  4. Click Save to apply the modifications and let ReSharper choose the settings layer, or choose a particular settings layer in the Save To drop-down list. To learn more about saving ReSharper settings, see JetBrains .NET Tools Blog: Save or Save To in ReSharper Options.
  5. Choose ReSharper | Tools | Cleanup Code in the menu to open the Code Cleanup dialog box for the current file or for a solution node (see Running Code Cleanup for details), and then select the newly created profile in the Available Profiles area.
  6. Click Run to perform Code Cleanup. ReSharper will remove all redundancies in the current file or in the selected solution node and according to the cleanup profile settings.

Tip

You can also remove code redundancies in the specific scope with the Fix in Scope.


This feature is supported in the following languages/technologies:

C# VB.NET HTML ASPX Razor JavaScript TypeScript CSS XML XAML RESX Build Scripts
feature_available