"Cleanup Code" menu item is disabled and Cleanup Code option page is empty

The solution:

1) Open ReSharper | Extension Manager;

2) Find installed “ReSharper.StyleCop” plugin;

3) Remove it;

4) Install "StyleCop by JetBrains" plugin instead.

 

We unfortunately have two different versions of Stylecop plugins in the extension manager. The "ReSharper.StyleCop" version is causing issues.

The "StyleCop by JetBrains" version is maintained by us. We'd love to merge the two, but author of the original is currently not responding to any form of contact.

7 out of 25 found this helpful
8 comments
Avatar
Permanently deleted user

Ok that seems to be installed now... how to I use it to get a text export of all the methods used in the projects?

Thanks.

0

In my case, the problem is actually that files like RouteConfig.cs are considered "installed by a NuGet package" and they get excluded from Code Cleanup. I have no idea how to re-enable that functionality.

1
Avatar
Permanently deleted user

It happened to me with UnityConfig.cs (inserted by the unity.mvc nuget package). If I rename it, I can run code cleanup. If I rename it back, the option is greyed again. However, I can find no suspicious mention of it in the nuget package, the targets files, the dotsettings files, or anywhere else.

1

The solution doesn't apply to me and I have the same symptoms.

Cleanup Code; Silent Cleanup Code; Reformat Code; and Apply Code Style from the Resharper=>Edit menu are grayed out and I can't access them.

My questions are:

  1. Under what conditions are these menu items disabled?
  2. Why can't I force a Reformat Code? Should it ever be disabled?
  3. Is there a way to get this working again?

I just have the Style Cop not the ReSharper.StyleCop plugin in my list along with a few others such as: Exceptional for ReSharper; Cyclomatic Complexity; Serialization Insprections; Enhanced ToolTip; etc. and I've used these for years.

Update: I have removed all plug-ins and I'm just running ReSharper and there isn't any change, the above menu items are all grayed out.

Edited by Christopher Guy
0

The Problem still exists in September 2018

0
Avatar
Permanently deleted user

Cleanup code menu is disabled, even though I have definitions

0
Avatar
Permanently deleted user

I have this issue and I don't have any StyleCop plugins installed. Is there any other known cause?

0

The problem still exists, but rebuilding the project usually helps.

1

Please sign in to leave a comment.

Have more questions?

Submit a request