resharper

Remove unused Usings across entire assembly

这一生的挚爱 提交于 2019-11-30 07:48:41
I am wondering if maybe ReSharper is able to run through every class and remove unused usings? I looked but I don't see an option like this in R# 4.5. Has anyone seen this in Resharper outside of just being able to remove usings in a single class? I believe that cleanup across a project is a new feature in ReSharper 5. I take that back, the feature is in ReSharper 4.5. If you right click on the solution, there's a Cleanup Code... item, which allows you to apply a cleanup profile to the solution. You can create a new cleanup profile from the Code Cleanup node within ReSharper options, if you

“Delegate subtraction has unpredictable result” in ReSharper/C#?

耗尽温柔 提交于 2019-11-30 07:47:21
When using myDelegate -= eventHandler ReSharper (version 6) issues: Delegate subtraction has unpredictable result The rational behind this is explained by JetBrains here . The explanation makes sense and, after reading it, I'm doubting all my uses of - on delegates. How then , can I write a non-auto event without making ReSharper grumpy? or, is there a better and/or "correct" way to implement this? or, can I just ignore ReSharper? Here is simplified code: public delegate void MyHandler (object sender); MyHandler _myEvent; public event MyHandler MyEvent { add { _myEvent += value;

ReSharper and auto closing parentheses

余生长醉 提交于 2019-11-30 06:14:31
Is there a way to avoid closing the following parentheses: String.Format( ) , or Console.WriteLine( ) automatically? Sometimes is this is annoying and unnecessary, and I end up pressing Delete to remove it. I tried disabling Auto-insert pair brackets, pharentheses and quotes and Auto-insert closing brace and it is still not working... The following options should be unchecked/checked in Resharper if you do not want autocomplete feature on parenthesis (all options can be accessed through Visual Studio > ReSharper > Options... > Environment ) To disable parenthesis auto insert in non method

Coderush and resharper, do they work together?

北慕城南 提交于 2019-11-30 04:53:25
anyone have any experience of using them together? How well does it work? or is it just too much grief? You don't want to do that. Both ReSharper and CodeRush want the keyboard. Specifically, CodeRush remaps the escape key (ESC) for its own purposes. ReSharper does not like that (note: ReSharper doens't do anything special with the escape key, but it still doesn't like it). As for choosing between them...they both have their points. CodeRush has better templating and more refactorings. ReSharper has built in unit testing for NUnit, and a healthy set of plugings. ReSharper also has Templates,

How to run NUnit test fixtures serially?

假装没事ソ 提交于 2019-11-30 04:49:56
I have several suites of integration tests implemented in C#/NUNit. Each test suite is a separate class, each fixture setup creates and populates a SQL Server database from scripts. This all used to work just fine prior to Resharper 5.1. Unfortunately, Resharper 5.1 begins to run several fixtures at the same time. This is a breaking change - they are all attempting to create and populate the same database, which obviously ends up in an mess. Is there any way I could have Resharper run my test fixtures serially? If not, what would you suggest to run my NUnit test fixtures serially, one fixture

Using a class's static member on a derived type?

独自空忆成欢 提交于 2019-11-30 04:08:53
Using Resharper 4.1, I have come across this interesting warning: "Access to a static member of a type via a derived type". Here is a code sample of where this occurs: class A { public static void SomethingStatic() { //[do that thing you do...] } } class B : A { } class SampleUsage { public static void Usage() { B.SomethingStatic(); // <-- Resharper warning occurs here } } Does anybody know what issues there are (if any) when making use of A's static members via B? One place where it might be misleading is when the static is a factory method, e.g. the WebRequest class has a factory method

Debugging jasmine tests with resharper and phantom js

你说的曾经没有我的故事 提交于 2019-11-30 03:02:51
问题 Similar question was already asked some time ago How do you debug Jasmine tests with Resharper? What is suggested there doesn't really work for me (place debugger; in test code). Each time the tests are run, a new browser window opens and thread jumps through debugger. Is there any way to make it work? And also is there any way to debug jasmine tests with phantom runner and Resharper? Thanks in advance 回答1: To debug in the browser, add the code below to your js test file. jasmine.getEnv()

Resharper formatting chained method

丶灬走出姿态 提交于 2019-11-30 03:00:33
问题 Is there a setting in R# to format chained method to start at the same character of the class instantiated. What I want: var foo = new FooDataBuilder() .WithDate(myDate) .WithBar(myBar) .Build(); What R# is giving me: var foo = new FooDataBuilder() .WithDate(myDate) .WithBar(myBar) .Build(); 回答1: With Resharper 7.1.2, you can get the following formatting: var foo = new FooDataBuilder().WithDate(myDate) .WithBar(myBar) .Build(); By setting the following Resharper options: Code Editing -> C# ->

How to diagnose Resharper Unit Test Runner “Unable to load one or more of the requested types” error

这一生的挚爱 提交于 2019-11-30 02:59:07
问题 When I run or debug my unit tests using Resharper Unit Test Runner, I get a dialog popping up that says "Unit Test Runner failed to run tests - Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information": Now I have tried rebuilds, cleans, manually deleting folders, visual studio restarts, hardware restarts, looking in output/debug windows, and evening enabling R# "internal" mode so that I can see it's logs (written to %Temp%\JetLogs as I

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

女生的网名这么多〃 提交于 2019-11-30 02:40:12
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 To dialog or how can I configure Resharper/VS to show the Navigate To dialog upon pressing Ctrl + , . In the Resharper options I have selected Visual Studio for the key bindings since that is what I am accustomed to, but for some reason this one has changed. Malice It sounds like you will need to remove the ReSharper keybinding and add the Visual