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
48
votes
9 answers

How can I configure ReSharper's code cleanup on save?

I would love to configure Visual Studio/ReSharper to run "Code cleanup" whenever I save a file. A bonus would be to configure this only for C# files, as I sometimes find that the cleanup on ASP.NET files does not work without introducing errors.
Thomas Jespersen
  • 11,493
  • 14
  • 47
  • 55
48
votes
3 answers

Running NUnit through Resharper 8 tests fail when crossing between projects due to AppDomain

I recently updated to Resharper 8, and when I tried to run a suite of projects. These tests contain two suites of integration tests that both use IISExpress to run a website, make web requests and check the responses. Running them in isolation is…
hawx
  • 1,313
  • 12
  • 10
48
votes
10 answers

Resharper runs UnitTest from different location

When I run unit tests with Visual Studio it works fine, because it runs from project directory where all assemblies are. But when I run it with resharper it goes with error on var services = Assembly.Load("SomeAssembly"); with error Could not…
Roar
  • 2,117
  • 4
  • 24
  • 39
48
votes
3 answers

Resharper Clean-up Code - how to affect sorting of methods?

I've got a customized clean-up and it's almost 'there'. However, R# appears to want to sort the member methods, but at least it does not appear to be alphabetically. Is there a way to force that sorting?
Anders Juul
  • 2,407
  • 3
  • 34
  • 56
48
votes
2 answers

How can I turn "Object Browser" to "Metadata" for "Go to definition" in Visual Studio 2010?

Before installing Resharper, Ctrl + Left Click for Go to definition, Visual Studio 2010 uses to Metadata. After the install Resharper, when I try to first time Ctrl + Left Click, Resharper asked me with popup where I want to go, I click Object…
47
votes
7 answers

Referring to a generic type of a generic type in C# XML documentation?

Writing some XML documentation for a predicate helper class. But I can't figure out I can refer to an Expression> without getting a syntax error. Is it even possible? I have tried this: But I…
Svish
  • 152,914
  • 173
  • 462
  • 620
46
votes
4 answers

Get correct indentation in Resharper for object and array initializers

Right now resharper formats our code like this: private readonly List folders = new List { new Folder() …
Harry
46
votes
9 answers

Any way to surround code block with Curly Braces {} in VS2008?

I always find myself needing to enclose a block of code in curly braces { }, but unfortunately that isn't included in the C# surround code snippets, which seems to be an oversight. I couldn't find anything on building your own surround snippets…
Jim McKeeth
  • 38,225
  • 23
  • 120
  • 194
46
votes
4 answers

How to Restore Navigate To Dialog in Visual Studio After Resharper Installation

After installing Resharper 7.1.2 for Visual Studio 2010, when I press Ctrl+, I no longer see the Navigate To dialog. Instead a Resharper dialog Recent Files appears. My question is, is there another key binding that I am not aware for the Navigate…
marteljn
  • 6,446
  • 3
  • 30
  • 43
45
votes
2 answers

How to stop ReSharper removing spaces in object initializer

I like my object initializers to look like this: new Point { Label = g.Key.Name, Claims = g }; When hit the semicolon key, they get reformatted like this: new Point {Label = g.Key.Name, Claims = g}; Where is the option to stop my padding from…
Nathan Ridley
  • 33,766
  • 35
  • 123
  • 197
45
votes
1 answer

Disable code analysis for current file in ReSharper

In ReSharper 4.x there was a shortcut (Ctrl+8) for turning off the code analysis for the current file, but I cannot find the equivalent in ReSharper 5.0. Anyone knows where to find it? The reason I want this is because I want to disable ReSharper…
Kjetil Klaussen
  • 6,266
  • 1
  • 35
  • 29
45
votes
6 answers

Cannot edit checked out file (TFS) in Visual Studio 2013

Since I changed my windows password I can no longer type into a checked out file in Visual Studio 2013! Where before I just needed to start typing and it would check out the file in the background, now it won't even allow me to type into the file…
Seamus Barrett
  • 1,145
  • 1
  • 10
  • 15
44
votes
1 answer

Is there a "Resharper-like" addin for MonoDevelop?

I've googled and not come up with much. Has anyone run across something like Resharper for Mono?
David Robbins
  • 9,996
  • 7
  • 51
  • 82
44
votes
4 answers

Is there a way to auto-generate GetHashCode and Equals with ReSharper?

In eclipse, when I code in Java, there is a feature to auto-generate a basic, efficient, and bug free implementation of hashCode() and equals() without consuming brain power. Is there a similar feature either built-in in Visual Studio or in…
Samuel Rossille
  • 18,940
  • 18
  • 62
  • 90
43
votes
8 answers

Can ReSharper generate code that copies properties from one object to another?

I'm looking for a way to accelerate a repeatable task when I write code. I have ReSharper and I'm thinking a customization could do what I need. I have two objects of the same type. I want to copy all of the public properties of one object to the…
a7drew
  • 7,801
  • 6
  • 38
  • 39