Quick-start tips
tip
You can also try the interactive tutorials available in ReSharper | Help | Tutorials.
You can change colors for everything ReSharper brings into Visual Studio editor. Go to Tools | Options | Environment | Fonts and Colors and find items starting with
ReSharper
.You can change ReSharper keyboard bindings for any action: go to Tools | Options | Environment | Keyboard and find items starting with
ReSharper
.In Visual Studio 2012 and later, you can use the Quick Launch feature to search and execute ReSharper commands.
While in the editor, press AltEnter and then start typing the name of a ReSharper command that you want to execute (more...).
Trying to learn ReSharper shortcuts? First, decide which of the two default shortcut schemes is more convenient to you. Then, use the selector in the right-upper corner of this page to switch shortcuts in help; or download and print a PDF version Visual Studio scheme or IntelliJ IDEA scheme.
As soon as you've typed a method signature, for example
public void Foo(string input
, press CtrlShiftEnter to insert all syntax elements that should follow and get in the position where you can continue typing (more...).Do you want to surround some code with a
try...catch
? Select a logical code block with CtrlAlt0→, press AltEnter and then choose a template under Surround with....You can select a block of code and use Ctrl+Alt+Shift + Arrow keys to move this block around (more...).
You can view recent clipboard entries with CtrlShift0V and select the one you want to paste (more...) .
If you open parameter info popup CtrlShiftSpace, you can use CtrlShiftSpace/CtrlAltShiftSpace to jump to next/previous signature.
Enum completion will automatically insert the Enum type as the prefix. No need to spell it out!
Enums completion is CamelHumps-powered. Try typing
StringComparison c = oic
.With
String.Format
, you can add a placeholder where the caret is. Press AltEnter and choose Insert format argument (more...).If a string literal is too long, press Enter and ReSharper will automatically put the part of it to the next line and insert the
+
sign. Delete the+
and the string parts will be back together (more...).Moving a property up 3 lines using cut/paste? There is a simpler way to do it: place your caret at the property, press Ctrl+Shift+Alt and use the up arrow key.
Check out other typing assistance features.
Using [NotNull] and [CanBeNull] attributes can help you find
NullReferenceException
even before running your code (more...) .Right-click a file, project, solution folder or entire solution in the Solution Explorer and select Find Code Issues to see errors, warnings, and suggestions for the selected item (more...).
Bothered with a highlighted code issue? Press AltEnter while you at the highlighted code and select Inspection [name of inspection], then you can choose to suppress the issue with comment or attribute or disable the corresponding code inspection.
You can suppress all inspections with a single comment — mark code with
// ReSharper disable All
and ReSharper will not complain about anything until it meets the corresponding// ReSharper restore All
.ReSharper's solution-wide analysis resolves visibility issues: you'll see if an internal member is used outside of its assembly and you'll never miss a single unused non-private member.
You can exclude files by masks from code analysis on the Code Inspection | Settings page of ReSharper options Alt+R, O.
You can go to the next/previous code issue in the file by pressing AltPg Dn/AltPg Up.
To find all localizable strings in your solution, set Localizable=Yes and Localizable Inspector=Pessimistic for the relevant projects, then find any such string, which will be highlighted with curly underline. Press AltEnter on it and choose Inspection 'Element is localizable' | Find similar issues.... (more...).
You can press Ctrl0T to quickly locate a type, method, or basically everything, while CtrlShift0T lets you locate files without other suggestions.
Place your caret at a
using
(orimport
if you work with VB.NET) directive and press ShiftF12. ReSharper will show where exactly this namespace is used (Find Usages of Symbols).Forgot where you were editing just now? Go to last edit location with ShiftCtrlBackspace.
Want to locate where the current symbol is declared real fast? Press F12 or just right-click the symbol.
Go to containing declaration (Ctrl0[) can be used with Shift to select the whole declaration
When locating
CustomerServicesTest
using Ctrl0T or any other navigation command, you don't need to type the whole thing. Just use CamelHumps and typecst
.AltHome takes you to the base type and AltEnd takes you to inheritors of the current type.
Do you want to move to the next member in a class? Alt0↓ will take you there; Alt0↑ will bring you back (more...).
Search for anything (usages, implementations, code external to scope and so on) fetches to the Find Results window. Use it then to navigate between search results with F8/Shift+F8 (more...).
In source code, ShiftAlt0L selects the current file in the Solution Explorer; in decompiled sources, it opens the Assembly Explorer window focused on the current type (more...).
To explore the stack trace that is currently in your clipboard, just press Ctrl0E,0T.
Start typing in any ReSharper tool window and the content will narrow down to matching items. CamelHumps matching works there as well.
Use Go To File CtrlShift0T to locate specific project in the Solution Explorer - just select a .csproj file.
When locating a type with Ctrl0T, you can use wildcards. Want all ViewModels? Type
*ViewModel
(more...).
You can define what context actions you want available in ReSharper | Options | Code Editing | [Language] | Context Actions.
Do you have multiple classes in the same file? Fix it fast. Press CtrlShift0R on the file in the Solution Explorer and choose Move Types Into Matching Files (more...).
Rename anything, anytime, anywhere with Ctrl0R,0R. You can do it even in fewer steps - just type in a new name and press AltEnter.
You can extract a method from a section of code using Ctrl0R,0M.
Want to move a string literal to a resource file? Press CtrlShift0R anywhere on the string and select Move To Resource (more...).
Type in new method signature (change the number or type of parameters, change the return type) and while the signature is highlighted with a grey frame, press AltEnter to apply the Change Signature refactoring.
Placing the caret at a property, you can press AltEnter to change it from auto-property to a property with a backing field and vice-versa (more...).
Press Ctrl0R,0S to change the signature of a method and see a preview before applying it. ReSharper will do the rest!
Think your code needs a good wash? Use Ctrl0E,0C and run the Full Cleanup profile (more...).
Generate various class members in seconds using the Generate command AltInsert.
You can add a copyright header to all files via ReSharper | Options | Code Editing | File header text and then run code cleanup for the whole solution (more...).
AltInsert in the Solution Explorer can create files from your file templates.. and folders too.
Type
class
and press TAB. Want it public or internal by default? Change the corresponding live template (more...).You can bind any member generation command to its own shortcut. Go to Tools | Options | Environment | Keyboard and look for commands starting with
ReSharper_Generate
.Create event subscriptions in XAML/ASP.NET WebForms/VB.NET using AltInsert and choosing Generate event subscriptions.
If you place your caret at a parameter in the constructor and press AltEnter, ReSharper can create a field or property and initialize it for you.
Type
foreach
and press TAB. ReSharper will start a live template for smart loop generation with type and name suggestions(more...) .
Use Ctrl0U,0L to run all unit tests in the solution (more...).
Want to run some particular tests? Select them in editor, right-click and choose Run Unit Tests
Ctrl0U,0R (more...).
Start typing in the Unit Test Explorer window to filter your tests by name.
Filter to failed tests while running them in the Unit Test Sessions window to see them pleasantly disappearing as they pass (more...).
In ASP.NET MVC applications, type
return View("
and press CtrlSpace. IntelliSense will list all available views.Type
rta
and press TAB. Fill in controller, then action arguments. Now it should be in correct order with IntelliSense!Want to check for missing Views in ASP.NET MVC? Turn on solution-wide analysis.
View("Login")
will show as red if the Login.aspx is not there.You can use the Go to File Member command in ASPX/Config files too. Press Alt0\ and look it up!
In ASPX pages, navigate to related files (CSS, JavaScript, User Controls, and so on) with CtrlAltF7.
Check out which features work in which languages in the ReSharper feature matrix.
ReSharper support team is always there to help you. Use the ReSharper support website to explore the knowledge base, or submit your support inquiry.
If you want a new feature to be implemented in ReSharper, feel free to post a feature request in ReSharper issue tracker. .