Questions tagged [resharper]

ReSharper is a refactoring and productivity extension by JetBrains that extends native functionality of Microsoft Visual Studio versions since 2003.

ReSharper is a productivity tool for Visual Studio that aims to improve the developer experience. Providing additional features for error correction, code completion, navigation, search, syntax highlighting, formatting and cleanup, code generation and optimization, it carries out a large number of automated refactorings and streamlines unit testing using NUnit, MSTest, xUnit.net, MSpec (via plugin), amongst other features (all without the need to compile).

Current ReSharper releases support Visual Studio 2010-2019; previous versions supported Visual Studio 2003-2008.

ReSharper currently supports C#, VB.NET, ASP.NET, ASP.NET MVC, Razor, TypeScript, JavaScript, CSS, HTML, XML, XAML, MSBuild and NAnt build scripts.

ReSharper's functionality can be significantly extended with its Open API. In fact, most of ReSharper's features are implemented using this same API that is available in ReSharper plugins.

4908 questions
71
votes
12 answers

Are there shortcut keys for ReSharper's Unit Test Runner?

For obvious productivity reasons, I make an effort of learning and using as many of the keyboard shortcuts for the various Re# commands. However, it seems that the unit test runner does not have any associated shortcut keys. I want to be able to…
Ray
  • 187,153
  • 97
  • 222
  • 204
70
votes
4 answers

ReSharper uninstall - Visual Studio no longer shows correct error highlighting

I've been trying out ReSharper and decided that I'd like to uninstall it. However, after doing so, Visual Studio no longer shows red underline highlighting that it normally uses to identify the location of errors in the code. This has happened on…
Nick
69
votes
3 answers

Visual Studio ReSharper Keymap for IntelliJ IDEA

I primarily use Visual Studio and ReSharper (R#) for development and have excellent working knowledge of R#. I want to leverage that knowledge in IntelliJ IDEA (with my personal Java adventures) without having to learn the IDEA keymap scheme. IDEA…
ehsanullahjan
  • 5,422
  • 4
  • 23
  • 21
69
votes
3 answers

Is there a way to disable ReSharper for a specific file?

I want to tell ReSharper to ignore a few files in my project. Some of them are just too large (they contain canned test data). Some of them are just confusing it (with a mishmash of Silverlight and .NET code). Is there a way to do this by putting a…
Roger Lipscombe
  • 89,048
  • 55
  • 235
  • 380
68
votes
8 answers

ReSharper complains when method can be static, but isn't

Why does ReSharper complain when a method can become static, but is not? Is it because only one instance of a static method is created (on the type) and thus save on performance?
Andreas Grech
  • 105,982
  • 98
  • 297
  • 360
65
votes
2 answers

What is the difference between new Object() and new Object{} in expressions in C#

I have the following code snippet: Expression> expression = model => new TDest{}; // Result: {model => new TestModel(){}} ReSharper refactors this snippet with RedundantEmptyObjectOrCollectionInitializer…
cSteusloff
  • 2,487
  • 7
  • 30
  • 51
65
votes
11 answers

Visual Studio freezing (crashing) while loading solution

I've met with a strange problem. I had 7 projects in the solution. I had to add another MVC project. Now when the document (from the new project) is opened (for example HomeController.cs) and when this project is initializing at the start, it…
krypru
  • 1,692
  • 3
  • 22
  • 29
65
votes
2 answers

Resharper: Implicitly captured closure: this

I am getting this warning ("Implicity captured closure: this") from Resharper: does this mean that somehow this code is capturing the entire enclosing object? internal Timer Timeout = new Timer { …
Aaron Maslen
  • 1,021
  • 1
  • 8
  • 10
64
votes
5 answers

Alphabetizing methods in Visual Studio

Is there any sort of plug-in or tool available for Visual Studio 2008 to alphabetize methods? Ideally I'd like a tool that will alphabetize a selection, or specified type (i.e. only methods, not member variables), either automatically or on-demand.
64
votes
2 answers

Path to Test Data Files for Unit Testing

I am currently using the standard Microsoft Unit Test suite in VS 2008. ReSharper 4.5 is also installed. My unit tests rely on an TestInitialize method which pre-loads a data file. The path to this test data file will differ depending on if I run…
BigBrother
  • 1,100
  • 1
  • 9
  • 17
63
votes
9 answers

Is there a visual studio automatic save configuration setting?

I use the java IDE IntelliJ IDEA and one of the features I like is that there's no saving. Everything's always saved and you just use history navigation. I tend to have both editors open and I'm always forgetting to save in VS. I'm running vs 2008…
Daniel
62
votes
7 answers

Resharper debugging a third party decompiled dll

Is there a way to debug into a decompiled dll using Resharper and if so how do you do this? For example I am trying to debug into System.Web.Http.ApiController where I have decompiled and can see the source. I have set a breakpoint but when I run…
Noel
  • 5,037
  • 9
  • 46
  • 69
61
votes
3 answers

How to make Resharper resolve path for CustomBinding MarkupExtension

I want to create some extended Binding-Markup-Extension, which behaves just like a normal WPF-Binding but does some things more (use different defaults, maybe add some behavior, etc.). Code looks like this: public class CustomBindingExtension :…
Simon D.
  • 4,451
  • 2
  • 28
  • 57
61
votes
8 answers

How to reorder type members with Resharper?

Typical scenario: a class that a lot of people have worked on. I'd like to sort methods, properties, etc... in alphabetical order. I'd like to be able to do this within the region or globally in the class. I see the feature in Resharper to do it,…
AngryHacker
  • 59,598
  • 102
  • 325
  • 594
60
votes
7 answers

Transfer all ReSharper Settings between PCs

I was wondering if there is a way to copy ALL my settings from ReSharper (including the StyleCop for ReSharper settings and the keyboard bindings I have set for ReSharper) from one PC to another?
Chris Watts
  • 2,284
  • 4
  • 23
  • 28