This question relates to this ReSharper YouTrack issue.
In Visual Studio 2010 with ReSharper 7.1.1 installed, if I go to Tools > Options > Environment > Keyboard, th
Add a macro that executes the command, then add the macro to a toolbar.
This works because it makes the keyboard-only command appear in the Macros menu in the Customize Commands dialog.
Details
Add a macro which does this:
Sub _ReSharper_SilentCleanupCode()
DTE.ExecuteCommand("ReSharper_SilentCleanupCode")
End Sub
Put this macro in a module which appears in Customize..Commands..AddCommand..Categories..Macros, such as Samples or MyMacros.RecordingModule, but not MyMacros.Module1 (the default when using the macro IDE).
Go to Tools..Customize..Command
and select the Toolbar
you want.
Now Add Command...
and select the Macros
category.
Select your Macros.Samples._ReSharper_SilentCleanupCode
macro.
Click Modify Selection
and change the name to #-)
or whatever text makes you think ReSharper Silent Code Cleanup without being too long for your toolbar. :-)
I tried this with Visual Studio 2010 and ReSharper 7.1.2.
Edit
Visual Commander is a apparently way to get this going on VS2012 as well - see comments below for more.