Questions tagged [resharper-5.1]

Use this tag for version specific questions about ReSharper 5.1 - the refactoring and productivity extension for Visual Studio by JetBrains. When using this tag also include the more generic [resharper] tag where possible.

21 questions
55
votes
4 answers

Ignore IgnoreAttribute

We have MSTest tests which automatically run in hourly production. One of these tests is marked with [Ignore] attribute because it is not yet ready to run it in our production environment. Now I want to start that test (only) on my local environment…
brgerner
  • 4,287
  • 4
  • 23
  • 38
18
votes
4 answers

Inherited test class from generic base is ignored in MSTest

When creating a generic base test class in MSTest, and inheriting from it, I'm unable to run the tests of all the inheriting classes. BaseDependencyPropertyFactoryTest is located in the Whathecode.PresentationFramework.Tests assembly. It is the…
Steven Jeuris
  • 18,274
  • 9
  • 70
  • 161
17
votes
2 answers

Disable resharper warnings that are dependent on build type

I'm using belt and suspenders type checking for potential null object problems. Resharper isn't playing nicely though. In a debug build it marks the if (button != null) check as always true and puts a warning marker in the sidebar. In a release…
7
votes
2 answers

strange Resharper warning on MemberInfo.DeclaringType

Resharper tells me that MemberInfo.DeclaringType can never be null: However when that code is run, the text "Top level member" is printed. I don't get it, what's wrong here?
JBSnorro
  • 6,048
  • 3
  • 41
  • 62
6
votes
4 answers

Automatically rename class to match file name

I have a class A in file B.cs. Now I want to rename this class to match the file name (B). Is there a refactoring or context action in VS or ReSharper which automatically can do this renaming for me without typing in the new name matching file…
thersch
  • 1,316
  • 12
  • 19
6
votes
1 answer

Auto highlight return lines

Eclipse (at least when using Java) has the feature to auto highlight all lines in a method where method returns when I place cursor on return type in method definition. Is there also such a feature for C# in Visual Studio + ReSharper 5.1.3? Code…
brgerner
  • 4,287
  • 4
  • 23
  • 38
5
votes
1 answer

How do I adjust the left margin on parameters in ReSharper/VS2010?

This is silly, but when I have something like this SomethingStupid.Whatever(string a, string b, string c); And then I break them off like this: SomethingStupid.Whatever(string a, string b, string c); My code cleanup moves them to that…
chum of chance
  • 6,200
  • 10
  • 46
  • 74
5
votes
5 answers

Automatically attaching to support behavior not completely successful

I have a Visual Studio 2010 solution containing several C# projects, with Resharper 5.1 installed and enabled. All these projects target the .NET Framework 4. This solution has been working fine for months, but this morning I got the following…
Gustavo Mori
  • 8,319
  • 3
  • 38
  • 52
5
votes
1 answer

Can you get ReSharper to display exceptions in Intellisense?

I'm a fan of the overridden Intellisense behaviour provided by ReSharper. However, I can't seem to get it to display exceptions (anything with the /// xml comment). Does anyone know a way to enable this…
Jason Down
  • 21,731
  • 12
  • 83
  • 117
5
votes
1 answer

How do I stop Resharper from running my Specifications project when I Run All Tests from Solution?

I have a bunch of unit test projects for various other projects, and I have one Specifications project for the web application which runs Selenium 2 code via NUnit. This takes a much longer time to run than the rest of the tests. I only want these…
adamjford
  • 7,478
  • 6
  • 29
  • 41
5
votes
2 answers

Can't find settings for "naming rule" in Resharper!

I got tired of Reshaper complaining on any variables I have named as "varID" to change to Camel Case (i.e. "varId"). So I tried to add a rule in Resharper under Edit 'Local Variables' Rule Settings And set the "Name Suffix" with a "ID" and it…
pghtech
  • 3,642
  • 11
  • 48
  • 73
4
votes
1 answer

Find usages not working for code which is not built because of pragma

If I'm building a debug solution and I have #if !DEBUG public void DoA() { DoB(); } #endif public void DoB() { } When I use resharper to do a Find Usages on DoB nothing is found. The purpose of find usages is to find all the usages of a…
thekip
  • 3,660
  • 2
  • 21
  • 41
4
votes
3 answers

Is there any way to disable ReSharper Web Form/MVC (.aspx) Code Formatting on Brace ( } ) Completion?

Is there any way to disable ReSharper Web Form/MVC (.aspx) Code Formatting on Brace ( } ) Completion? It is really frustrating and most of the time is not what I want. For instance if I have: <% if (CurrentUser.IsRole(Helper.UserRole.Agent)) { %> …
GONeale
  • 26,302
  • 21
  • 106
  • 149
4
votes
1 answer

Move class into another class by ReSharper

I have a non-nested class WillBeNestedClass and another class NestBox. Now I want to move class WillBeNestedClass into class NestBox as a nested class. So WillBeNestedClass will be nested in class NestBox. Is there a refactoring in VS or ReSharper…
thersch
  • 1,316
  • 12
  • 19
2
votes
3 answers

Extend file renaming in VS 2010

I want to be able to rename classes with associated file in VS without loosing file history in Perforce. I thought I could include an Perforce command (p4 move...) in file renaming of Visual Studio or in class-renaming of ReSharper. I see 3…
thersch
  • 1,316
  • 12
  • 19
1
2