ReSharper Ultimate 10.1 EAP Build 1 (Part 1)

Have you felt like it’s been all about Project Rider lately? Guess what, it hasn’t. We’ve been busy updating ReSharper Ultimate tools, and yesterday opened a new Early Access Program: ReSharper Ultimate 10.1 EAP 1 is now available for download.

This initial ReSharper Ultimate 10.1 EAP build accumulates a lot of changes across ReSharper and ReSharper C++; a few notable improvements in dotPeek and dotTrace; while changes in dotMemory and dotCover are so far limited to bug fixing and cosmetics.

Well, in fact, there are so many changes that this post only unveils those of them that relate to C# support in mainline ReSharper. Changes in support for other languages, as well as improvements to ReSharper C++, dotPeek and dotTrace will be described in a separate post later this week.

Anyway, please read on.


New context actions around strings

C# 6.0 as a whole and string interpolation in particular has been supported for a while, and this update adds a bunch of actions that help you switch between different ways of handling strings, such as interpolation, concatenation, and string.Format(), and makes sure all this is just an Alt+Enter away.

For instance, there’s now a context action to rewrite a string interpolation expression as a string.Format() call:
Convert to string.Format() call

Fancy string interpolation over concatenation? Alt+Enter will save you the effort of finding the right keys on your keyboard:
Convert string concatenation to interpolation

Gone way overboard experimenting with C# 6.0 features? No problem, ReSharper will detect whenever there’s nested string interpolation that should can be simplified:
Inline nested string interpolation

In some contexts, you just don’t need to use verbatim characters to differentiate identifiers from keywords. ReSharper can now point you at this kind of redundancy, and help you get rid of it locally or in a wider scope:
Remove redundant verbatim character

Other new actions around strings help:

  • Make a string equality check case-insensitive
  • Insert new arguments into string interpolation expressions
  • Use string interpolation expressions with various logger frameworks

New context actions to check argument values

Another group of context actions serves to generate checks upon method parameters based on their types:

  • For string parameters, ReSharper helps generate checks not only for nullness but for empty and whitespace strings
  • For numeric parameters such as int, double or decimal, ReSharper can write a check that ensures that only non-negative values are passed
  • For enum parameters, ReSharper generates a check that makes sure that an enum value being passed is in fact defined in the appropriate enum declaration, therefore guarding against ill-fated casts
  • Finally, for collection parameters, ReSharper helps set up a check against empty collections

Context actions to check parameter values

WCF-specific context actions, inspections and quick-fixes

Something clicked, and we’ve come up with a few inspections and actions that address some of the most common issues in WCF service development.

For example, whenever you have a WCF service method that is marked as [OperationContract(IsOneWay=true)] but it returns anything other than void or Task, ReSharper will spot this and suggest a fix to prevent a runtime error: you can either change return type to void or make the method two-way:

WCF quick-fix for a one-way operation that returns a non-Task type

If you have a [ServiceContract]-annotated interface that doesn’t have a single [OperationContract] member, then there’s something clearly going wrong: ReSharper will spot this and provide a quick-fix to annotate all members of the interface with [OperationContract].

Likewise, if you have methods marked as [OperationContract] in an interface that doesn’t have a [ServiceContract] annotation, ReSharper will spot this and suggest two options to resolve the issue:

WCF: containing type not marked as ServiceContract

Finally, there are new context actions to help you annotate all members in a [DataContract] type with either [DataMember] or [EnumMember] attributes. The longer your [DataContract] types are, the more you’re likely to appreciate this context action:

Context action to annotate WCF DataContract members with EnumMember

More new context actions and quick-fixes

There’s an assortment of new context actions and quick-fixes that can’t be classified as easily. These include:

  • A pair of context actions, one of which comments out a selection (effectively serving as an Alt+Enter equivalent of dedicated ReSharper shortcuts for commenting code), and the other uncomments whatever comment is under caret
  • A context action to delegate implementation of a non-implemented interface to a new field of the corresponding type
  • A pair of context actions to split or join attribute sections
    Context actions to split or join attributes
  • A context action to create another part of a partial type
  • A context action to add braces around switch case statements

Invert Boolean Member refactoring

When you modify a member that returns a boolean so that it gets an opposite meaning (say, refactor a method called IsNotAvailable() to IsAvailable()), you likely want to invert the value that it returns, and update other members that receive values from it.

This is what the new Invert Boolean Member refactoring can do for you. For example, by invoking it on a method, you can choose to rename the method and either invert values inside the method, and/or invert usages of the method.

Invert Boolean refactoring

The refactoring can be invoked on a method, property, local variable or a parameter.

More ReSharper improvements; changes to ReSharper C++, dotTrace and dotPeek…

…will be described in a follow-up post shortly.

What’s next?

Please download ReSharper Ultimate 10.1 EAP and make sure to put it to good use.

If you are experiencing issues with the EAP, please report them to issue trackers of affected products. Links to issue trackers that you can use to report or track issues are as follows: ReSharper, ReSharper C++, dotTrace, dotCover, dotMemory, dotPeek.

Comments below can no longer be edited.

13 Responses to ReSharper Ultimate 10.1 EAP Build 1 (Part 1)

  1. Avatar

    Sebastiaan Dammanm says:

    February 4, 2016

    Regarding project Rider… Are you also investigating an out-of-process ReSharper for Visual Studio? Sounds like a good chance to improve performance and stability for ReSharper. Also memory pressure thus the number of GC should decrease.

    • Avatar

      Jura Gorohovsky says:

      February 4, 2016

      Yes, absolutely. This is on a long-term plan for ReSharper.

  2. Avatar

    Alex Angas says:

    February 4, 2016

    While you’re working on improvements to String.Format, can you please take a look at RSRP-47639? It’s been a wanted feature since 2007 🙂

    Also, along with the context actions for argument values is it possible to include RSRP-293964?


    • Avatar

      Mike-EEE says:

      February 6, 2016

      LOL… so you want to build a very powerful IDE extension. 🙂 I feel Team R#’s pain here. So many features, so many bugs… will they ever be fixed?! Software is hard. 😛

  3. Avatar

    Giedrius says:

    February 5, 2016

    Argh, is still not fixed, hopping that will be fixed till 10.1 RTM.

    • Avatar

      Anton Lobov says:

      February 8, 2016

      Surely will be. Raised the priority.

  4. Avatar

    Urs Meili says:

    February 5, 2016

    while you’re improving string operations, how about “move all strings in selection to RESX file”? I am so fed up to press F6 (Move) on every single string literal. I have waited for this since R# 3.0

  5. Avatar

    Martin says:

    February 8, 2016


    citizenmatt writes on GitHub:
    that in R# 10.1 a dnx runner are be included. But i can’t find any information about that?

    Will be this feature moved to another Release?

    • Avatar

      Matt Ellis says:

      February 8, 2016

      No, this is still planned for 10.1 – this is just the first EAP, not the final feature set. However, we’re also aware that DNX is still very much of a moving target – it’s not even called DNX any more!

  6. Avatar

    Jarrod says:

    February 8, 2016

    I still can’t even use Resharper 10.0 because it uninstalls itself every single time I add an extension to it. I’m stuck with 9.1.3

    • Avatar

      Slava Trenogin says:

      February 11, 2016

      Jarrod, what plugin you were installing? It’s for ReSharper 10.0.2, right?

  7. Avatar

    Paneer Shekar says:

    February 9, 2016

    To the empty collection check, I think !collection.Any() is a better candidate vs. collection.Count == 0.

  8. Avatar

    Patrick says:

    February 17, 2016

    Will Resharper be fully integrated into the IDE as oppose to a separate addon?

Discover more