Questions tagged [resharper-5.0]

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

Here are highlights of some of the features in Resharper 5.0:

Code Analysis for C#
ReSharper analyzes and highlights errors in C# code (up to C# 4.0) while you type, without having to compile it first. It also helps you solve problems instantly, by suggesting quick-fixes for most errors. You can analyze your code both in a current file and throughout the entire solution. For example, in C# 3.0 Resharper will recommend using "var" for type initialization, or making a method static.

Coding Assistance
ReSharper extends and improves Visual Studio's native code completion. If you begin to use a namespace that isn't referenced, Resharper shows you a list of candidates and will automatically insert the appropriate using statement at the top of the class for you. It introduces color highlighting for fields, local variables, and types; transforms code using context actions; lets you move and duplicate blocks of code; auto-inserts brackets, parenthesis and quotes; shows concise documentation for types, type members and method parameters as pop-up tips, and more.

Code Cleanup
Code Cleanup enables you to run a dozen useful ReSharper features at once — specifically, reformat your code according to custom style settings, arrange usages of 'this' qualifier, remove code redundancies, convert properties with backup fields to auto-properties, make fields read-only if possible, optimize using directives, shorten qualified references, update file header, replace explicit types with vars, and revamp your code with many more settings.

Code Generation
ReSharper is smart enough to generate method stubs from usage, and feature-rich enough to provide special-purpose dialog boxes for creating constructors, read and write properties, and more. All these classy tools are readily accessible from a single pop-up window.

Code Templates
You can use a rich set of predefined code templates as well as define your own templates to automatically create loops, arrays, variables, method declarations, and a variety of other code constructs. File templates, 'surround with' templates and live templates for C#, VB.NET and XML let you choose the most convenient way of inserting a ready piece of code in any situation.

Navigation and Search
Whenever you need to find a certain type, field, method, or any other symbol, ReSharper provides you with a variety of ways to do it. You can find a symbol by name, navigate to a symbol declaration from its reference in code, or find and highlight symbol usages. ReSharper also allows you to thoroughly review type hierarchies and file structures, with its dedicated tool windows that are smartly integrated into Visual Studio user interface.

Refactoring
ReSharper provides a much wider set of automated code refactorings than Visual Studio. In total, 34 different refactorings are available.

Unit Testing
ReSharper automatically detects whether your project contains NUnit tests. It allows you to run and profile unit tests right from the code editor, shows the structure of tests in your solution, and provides you with a dedicated window where you can analyze test results and re-run unit tests. Support for other test frameworks (MbUnit, xUnit, MSTest) is available via third-party plugins.

47 questions
4
votes
1 answer

ReSharper 5 Search with Pattern

I just recently ran into the "Search with Pattern" tool in the new ReSharper. I tried to search for private $Type$ $Var$ = new $Type$($TypeArgs$); but when I search it just says "Cannot parse pattern" when I take way the private access modifier it…
Chris Watts
  • 2,284
  • 4
  • 23
  • 28
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
4
votes
6 answers

How good are the resharper 5.0 nightly builds?

They have pretty low stars.... is it at least equivilent of 4.5? or is it just a pain to use? http://www.jetbrains.net/confluence/display/ReSharper/ReSharper+5.0+Nightly+Builds
Keith Nicholas
  • 43,549
  • 15
  • 93
  • 156
3
votes
1 answer

Force Resharper to open designer when navigating with CTRL+SHIFT+T

When I press CTRL+SHIFT+T dialog for file search pops up, I find file I'm interested in, and when I press Enter - if file is .resx or .dbml - it's opens in text editor. Can I force Resharper to open file in whatever editor is used by default (same…
nikib3ro
  • 20,366
  • 24
  • 120
  • 181
3
votes
1 answer

ReSharper 5.0 choking on strong-typed view model that's located in same project

I'm using VS2010, ASP.NET MVC 2, and ReSharper 5.0. When I create a new view that's typed off of a model from the same project as my view, ReSharper doesn't see the reference to the model. This is the definition of my view: <%@ Page Language="C#"…
2
votes
1 answer

Resharper: Is there a hotkey to disable it when in editor?

I just love resharper 5... its great but sometimes i would like to use the hotkey to disable the lines underlines etc etc in the code editor as it interferes with some other plugins i have... Is there a hotkey to do this?
Martin
  • 23,844
  • 55
  • 201
  • 327
2
votes
1 answer

ReSharper - Conditional Compilation XML comment errors

If I have the following code... #if PocketPC /// Indicates whether usage of the Windows Mobile 5.0+ GPS intermediate driver is allowed. private static bool allowGpsIntermediateDriver = true; ///…
Damien
  • 1,463
  • 1
  • 18
  • 30
2
votes
3 answers

Resharper 5 - are speed & memory bloat issues solved?

I am on Resharper 4.x and VS2008. R# seems to slow down the living crap out of VS2008. And of course, the memory usage can easily go to 500MB on a middle of the road Winforms solution with 7-8 projects. Now that Resharper 5.x is out, can anyone…
AngryHacker
  • 59,598
  • 102
  • 325
  • 594
2
votes
2 answers

How do I suspend ReSharper 5.0 AND get back the default key settings in Visual Studio 2010?

I have a project with many projects that performs miserably with ReSharper enabled, even on a pretty decent machine (8GB RAM, hybrid solid state hard drive, Core 2 Duo processor). I was able to find out how to suspend ReSharper, but none of the…
Josh Kodroff
  • 27,301
  • 27
  • 95
  • 148
2
votes
0 answers

How do I upgrade ReSharper 4.5 settings to ReSharper 5.0 settings

I've recently upgraded my code from Visual Studio 2008 .NET 3.5 to Visual Studio 2010 .NET 4.0. I've used ReSharper 4.5 and now I'm using ReSharper 5.0. I want my ReSharper 4.5 settings (the ones in .resharper file) to be upgraded to ReSharper 5.0…
brickner
  • 6,595
  • 3
  • 41
  • 54
2
votes
1 answer

C#/Resharper 5 structural search, detect and warn if any non-virtual public methods on classes with certain attributes

I'm using LinFu's dynamic proxy to add some advice to some classes. The problem is that the proxied objects can only intercept virtual methods and will return the return type's default value for non-virtual methods. I can tell whether a class is…
chillitom
  • 24,888
  • 17
  • 83
  • 118
1
vote
3 answers

Can I search by a reference name, solution-wise, to see in which projects it was referenced?

Is there any possibiliy to searh the whole solution to see a particular refrence's usage? Let's say, can I see in what projects the reference "Xyxyxyxy.dll" is referenced? (ReSharper based answers are also acceptable! :) ) Thanks!
pencilCake
  • 51,323
  • 85
  • 226
  • 363
1
vote
3 answers

One good video for Resharper rampup

I'm installing it now. I've seen a few videos where people have Resharper installed and it is amazing how fast they are writing code and navigating. In the past, I've had to uninstall Resharper because it was too much adjustment and too many of my…
MedicineMan
  • 15,008
  • 32
  • 101
  • 146
1
vote
1 answer

resharper search with pattern for using(... new System.Data.Linq.DataContext)

I am attempting to search for using (var context = new $DataContext$()) where DataContext is any class that extends System.Data.Linq.DataContext using Resharpers 'Search with Pattern'. The pattern I'm using is: using($type$ $var$ = new…
wal
  • 17,409
  • 8
  • 74
  • 109
1
vote
3 answers

Some ReSharper key mappings not working. How do I add a parameter through refactoring?

I have ReSharper 5.0 for C# running on VS 2008 SP1. Most key combinations like (Ctrl+R, Ctrl+R) for renaming an identifier or (Ctrl+Shift+T) for going to a file work. I thought I would try some of the other refactorings like adding a parameter to a…
Blanthor
  • 2,568
  • 8
  • 48
  • 66