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
4
votes
5 answers

modified closure warning in ReSharper

I was hoping someone could explain to me what bad thing could happen in this code, which causes ReSharper to give an 'Access to modified closure' warning: bool result = true; foreach (string key in keys.TakeWhile(key => result)) { result =…
Sarah Vessels
  • 30,930
  • 33
  • 155
  • 222
4
votes
1 answer

Running ReSharper Tests in Parallel by NameSpace

I am wondering if I can run my NUnit tests in parallel, I'm using the R# test runner and there is the option of running assemblies in parallel. I have a Test Project with all of the tests and they are all 'grouped' and ordered by namespace. Is there…
Jamie Rees
  • 7,973
  • 2
  • 45
  • 83
4
votes
1 answer

How to Iterate a Resharper Template?

I have a small Resharper Template I have written for Null check of a function Parameter (C#). Check.IsNotNull($param$, "$param$"); - Suggest Parameter - #1 I can now null check the function paramters one by one. But I want to be able to null check…
sree
  • 41
  • 1
4
votes
2 answers

Text output from tests using Visual Studio 2008 + Resharper + NUnit

I like to do console output for exploratory purposes when I am creating a unit test. Is there a way to see the Console.WriteLine("s") in Visual Studio when executing my test using Resharper? I don't keep the console output in the final version of my…
Deleted
  • 4,067
  • 6
  • 33
  • 51
4
votes
1 answer

Written a resharper plugin that modifies the TextControl?

Resharper claims to eat it's own dogfood, specifically, they claim that many of the features of Resharper are written ontop of R# (OpenAPI). I'm writing a simple plugin to fix up comments of the current document of a selection. When this plugin is…
Ajaxx
  • 2,500
  • 4
  • 27
  • 38
4
votes
2 answers

ReSharper: 'Name' attribute is not allowed here; use 'x:Name' instead in XAML

ReSharper's complaining about some of my XAML with the following error: 'Name' attribute is not allowed here because type 'FlashingTextBlock' is implemented in the same project. Use 'x:Name' instead What's the problem here? Should I do what…
Roger Lipscombe
  • 89,048
  • 55
  • 235
  • 380
4
votes
1 answer

Does resharper add any kind of code refactoring to VS that Eclipse doesn't have?

And if so are there Eclipse plugins that add those types of code refactoring to eclipse? note:for C#/Java respectively.
Roman A. Taycher
  • 18,619
  • 19
  • 86
  • 141
4
votes
1 answer

Fun with generics: no implicit reference conversion error

I tested this code and got that it doesn't compiles. interface IE { } class A : IE { public static void F() where TU : IE { } static void Foo() { F>(); } } It fails even if I add public…
Alex Zhukovskiy
  • 9,565
  • 11
  • 75
  • 151
4
votes
1 answer

Disable automatic insertion of ByVal

When I do the extract method refactoring, ReSharper always wants to put the ByVal modifier everywhere. Explicitly putting ByVal isn't required anymore and Visual Studio itself doesn't do that anymore. I've looked at the Visual Basic .NET subsection…
Jeff B
  • 8,572
  • 17
  • 61
  • 140
4
votes
1 answer

Custom ReSharper pattern - using String.SomeMethod instead of string.SomeMethod

I know there is no different between string and String in C# (except for the using System that is added for System.String). Still, same like in this SO-answer, I'd prefer to use string with a lowercase s as type, and String with an uppercase S when…
Kevin Cruijssen
  • 9,153
  • 9
  • 61
  • 135
4
votes
1 answer

Can I add a command to make ReSharper repeat last test run to the right click context menu in visual studio?

I'd like to add a context menu item to allow me to repeat resharper's last test run, similar to the one that test driven.net adds. Is this possible?
Sam Holder
  • 32,535
  • 13
  • 101
  • 181
4
votes
4 answers

Problem with SQLite related nUnit-tests after upgrade to VS2010 and Re#5

After converting to Visual Studio 2010 with ReSharper5 some of my unit tests started failing. More specifically this applies to all unit tests that use NHibernate with SQLite. The problem seem to be related to SQLite somehow. The unit tests that…
stiank81
  • 25,418
  • 43
  • 131
  • 202
4
votes
1 answer

Why does R# tell me "Cannot resolve assembly System.Drawing" when I am referencing System.Drawing?

When I run "Inspect > Code Issues in Solution", R# tells me "Cannot resolve assembly System.Drawing" and points to this line of xml in a *.resx file:
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
4
votes
1 answer

Find usage of property from base entity

I'm trying to find the usage of a property in a class where the property belongs to a base class. Here is a token example: class Program { class Item { public DateTime DeletedStamp { get; set; } public decimal Price { get;…
Maffelu
  • 2,018
  • 4
  • 24
  • 35
4
votes
1 answer

How to stop ReSharper from showing error on a lambda expression where Action is expected?

In Silverlight, System.Windows.Threading's Dispatcher.BeginInvoke() takes an Action or a delegate to invoke. .NET allows me to pass just the lambda expression. but ReSharper sees it as an error, saying "Cannot resolve method 'BeginInvoke(lambda…
carlmon
  • 396
  • 6
  • 20