resharper

Refactoring tool

I am using several months ReSharper 4.5 It's very powerfull tool but use a lot of system resources and VS working very slow with it. With which tool I can replace Resharper with the same functionality. Which refactoring tool do you use? ...

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 = result && ContainsKey(key); } return result; Even if the code above seems safe, what bad t...

VS 2010: Can’t insert mvvm-light snippet using shortcut - incompatibility with resharper 5???

Hi there, i recently installed some snippets that come with the mvvm-light framework i am using. And sure enought i checked via Tools > Code Snippet Manager and they are installed under "My Code Snippets". If i do insert Snipper (right click in code window) or CTRL K + CTRL X then i can search within all available snippets.... ...

Visual Studio (2008) - Which projects reference a particular assembly?

I have a solution with a decent number of projects (say, 30) and I want to find which of these projects reference a particular assembly. Here's a concrete example: In the Object Browser I can see that two different versions of the same assembly are referenced throughout the solution. I want to see which project(s) use each of these ref...

Shortcut to create automatic properties using Visual Studio 2008/2010 or Resharper 5

I have a class that contains a load of properties that contain results of some calculations e.g: public class Results { public double Result1 { get; set; } public double Result2 { get; set; } } In a different class I am doing calculations to populate the above properties, e.g: public class Calc { private Results Calc() ...

How do I generate a constructor from class fields using Visual Studio (and/or ReSharper)?

I've gotten accustomed to many of the Java IDEs (Eclipse, Netbeans, IntelliJ) providing you with a command to generate a default constructor for a class based on the fields in the class. For example: public class Example { public decimal MyNumber { get; set; } public string Description { get; set; } public int SomeInteger ...

Is it possible to disable Resharper reformatting of a section of a file?

Possible Duplicate: Is there a way to keep ReSharper from formatting a region of code When I want to test parsing logic on data that would usually be read in from a file or an HTTP call, etc, I usually turn that data into a string in the test. A (short) example is as follows: Line 1 Line 2 Line3 Line 4 Would become: ...

ReSharper conventions for names of event handlers.

Hello, When I add new event handler for any event, VS creates method like object_Click. But ReSharper underlines this method as Warning, because all methods should not have any delimeters such as "_". How can I customize rules of ReSharper so that it doesn't underline such methods? Or may be I should rename such methods? Thanks in a...

Resharper API development - Find Incoming calls

I am trying to make a program which will utilize resharper's "find incoming calls" feature. This is not a resharper plugin, but rather a console app (or similar) which finds the incoming calls to all properties on several particular types in my code. I have been searching the web for quite some time to find this, and have come up with n...

How to edit resharper's action list

In Resharper I edited the inspection severity of the 'use var keyword when possible' to ''do not show'. But when I select a certain word in the code file, Resharper still shows a pencil with an Action list in the left border with the action 'use var'. Where can I edit the actions that should be shown? I cannot find this option. ...

NUnit - ExpectedMessage differs error

I am quite new to TDD and am going with NUnit and Moq. I have got a method where I expect an exception, so I wanted to play a little with the frameworks features. My test code looks as follows: [Test] [ExpectedException(ExpectedException = typeof(MockException), ExpectedMessage = "Actual differs from expected")] public void...

Ignore designer and generated files in Resharper analysis

I've been using Resharper for a few days and I really like this tool, but there's one thing that annoys me about it and I wonder if it can be changed. I'm getting lots of issue notifications from generated code (almost 1400 in my project). I'd want to set those files as ignored so they won't be checked as you can do with StyleCop and Co...

ReSharper no longer runs unit tests

Hey folks I'm trying to write some unit tests for an app I work on at work (In the vague hope that others might follow suit), and I was originally running these tests using NUnit and the ReSharper plugin. However, ReSharper will no longer run tests for me for some reason: It simply crosses them out with a red strikeout. There's no err...

Highlight all occurrences of a selected object with ReSharper

I was used to use RockScroll (or MetalScroll), but when I started to use ReSharper my RockScroll start to show some bugs. Well, this is scope to another discussion http://stackoverflow.com/questions/1089493/is-rockscroll-compatible-with-resharper. But my problem is related, because now without MetalScroll I can't highlight all occurrenc...

Eclipse and Background Compile like Resharper in Visual Studio

In Visual Studio with Resharper I can set the project to background build as I type. A red icon on the status bar appears the instance I code something wrong. Green if all is good. It does this by compiling all the time. Is there a way to enable this in Eclipse? ...

Visual Studio Linked Files Directory Structure

I have two versions of a project. One for Silverlight and one for .NET. The SL project has the vast majority of the code base in it. I want to globally add all files from the SL project into the .NET version as linked files. I've managed to do so successfully like this in the csproj file for the .NET version: <Compile Include="..\MyProj...

ReSharper show warning with SqlDataReader

When I write something like this: using (var connection = new SqlConnection("ConnectionString")) { using(var cmd= new SqlCommand("Command")) { using (var reader = cmd.ExecuteReader()) { while (reader.Read()) { } } } } ReSharper shows warning on reader.Read(), and ...

NUnit Addins with Resharper 5

The latest Resharper (v5) version is based on native NUnit code and allows NUnit addins. I have a NUnit addin that works fine in NUnit GUI but I can not make it work with Resharper. Based on R# indication I have put my addins library in %ResharperPath%\Bin\addins but I doesn't work, my tests are marked as Ignored. Question: How to use...

Resharper 5 - enable/disable on the fly

I want to disable ReSharper 5 when debugging - it slows things down more than I'm willing to take. Is there an automatic way to do this? The next best thing would be a toolbar button to manually enable/disable it. On the Tools -> Options -> ReSharper page there's a comment that the VS command Resharper_ToggleSuspended would do just...

Resharper 5.0 slows down VS 2008 after license is added. Especially ASPX pages

I just purchased a license to ReSharper 5.0 and it has been almost impossible to edit ASPX pages. I read somewhere that I can disable code analysis on a single page with the following command "Ctrl+Shift+Alt+8". But it also hasn't worked. Is there a way to disable ReSharper Code Analysis on all ASPX pages? ...