Meet ReSharper Ultimate 2017.1!

This year’s first major release of ReSharper Ultimate is finally here with an ultimate support for Visual Studio 2017! We invite you to download the 2017.1 update and check all the long-awaited features, which you can read about in this post.
Along with 600+ fixes in ReSharper and 110+ fixes in ReSharper C++ this release comes with the following major improvements:

Let’s dig into the details!

Visual Studio 2017 RTM support

ReSharper 2017.1 can now work with solutions loaded in a lightweight mode. When you use the Open Folder option, ReSharper sees all the files in the folder and supports .xml and .js file types. Move to Folder refactoring works in this mode.

ReSharper also respects the current target framework context, which is set by the drop-down at the top of the editor window. You’ll find more details about ReSharper’s support for the latest Visual Studio version in the video below:

C# 7 support

ReSharper receives a lot of new inspections, introduces new quick-fixes, and updates existing ones to support C# 7 language features.

We’ve extended ReSharper’s support for local functions and added two context actions that allow you to convert lambda expression or anonymous method into a local function and convert local function into a regular method. There’s also a new quick-fix that suggests converting a read-only delegate variable into a local function.

Join null check with assignment quick-fix has been implemented to support throw expressions. It makes the code more readable by combining the assignment, the null-coalescing operator, and throw. The existing context action Convert to ‘?:’ operator and the .throw postfix template also support C# 7 throw expressions.

Watch the video to see how ReSharper helps you use the new C# 7 features:

Unit testing

ReSharper’s unit testing works in both project.json- and .csproj-based projects in Visual Studio 2017 RTM. It discovers and runs MSTest and xUnit tests and supports code coverage and profiling as well as targeting multiple frameworks. NUnit tests that target .NET 4.x frameworks are supported. There’s also DataRow support for MSTest v2.

Note that ReSharper currently doesn’t support continuous testing for .NET Core unit tests. This will be fixed in the next updates.

EditorConfig support and other code style improvements

Maintaining a consistent code style throughout your code bases is important since making the code more readable for all project contributors saves everyone’s time and even helps you avoid some errors. ReSharper 2017.1 provides several new features for keeping your code neat and clean. Watch the video for a quick overview of some of the updates and read on for more details.

EditorConfig support

EditorConfig offers a convenient way to share code style settings with colleagues who use different editors and IDEs. EditorConfig support in ReSharper 2017.1 is enabled by default. Below is an example of .editorconfig file settings supported by ReSharper:

root = true
# Most of the standard EditorConfig properties are supported

# Most of Roslyn EditorConfig properties for Visual Studio 2017 are supported
csharp_space_between_parentheses=expressions, type_casts, control_flow_statements

# Custom EditorConfig properties for every code formatting setting available in ReSharper options

For more details on what EditorConfig properties ReSharper understands, refer to the Using EditorConfig help section. And watch the video to see how ReSharper uses EditorConfig to share formatting settings across your team:

Layered settings for tabs and indents

ReSharper’s layered settings feature is a great tool to maintain a consistent code style if most of your team members use ReSharper. Now it is extended with Tabs and Indents settings for all supported languages.

Tabs and Indents options page

Autodetection of the indent size and style

When you contribute to existing projects you may not have enough time to fine-tune code style settings. This is where a new ReSharper’s feature comes in handy. ReSharper now automatically detects and sets the indent size which is used in a file. This feature is disabled by default and can be enabled on the General Formatter Style ReSharper’s options page.

File formatting info

The new File Formatting Info window displays the sources of code style settings, including scopes and properties defined in all active .editorconfig files, the source of indentation settings and its value, and the status of indent autodetection.

Contextual configuration of formatting rules

The process of adjusting a new tool for your preferred code style can be tedious. To save your time, ReSharper offers contextual configuration of the formatting rules, which is now available in С#, C++, JavaScript and TypeScript. Select some code, press Alt+Enter and choose Format Selection | Configure to see formatting rules that affect only the selected code.

Code style, formatting and cleanup improvements

ReSharper’s Code Cleanup gets usability improvements. Now you can create and configure your custom task-specific profiles right in the Code Cleanup dialog box, simply by pressing Ctrl+E,C.
Code Cleanup dialog box

ReSharper applies its configured formatting rules to any code you paste. The Reindent option that affects only the indentation is set by default and you can change it on the Editor Behavior options page.

ReSharper 2017.1 introduces new code style settings for C# type members bodies, allowing you to choose between always using a body block, with braces, or using the expression format. ReSharper will mark any incorrect usage and provide a quick-fix to quickly rewrite to the correct style.

Expression body code style settings

C# code formatting engine has been significantly rewritten. We’ve fixed a lot of bugs and introduced new formatting options:

  • The new wrapping engine now handles the alignment correctly
  • Comma-first wrapping style is supported
  • Set spaces before and inside the parentheses of ‘nameof’
  • Choose preferred wrapping style for chained binary expressions
  • Configurable line breaks in a single ‘case’ statement

Finding usages of a specific interface or type becomes even more convenient with a new button in Find Results window to group by kind of usage. The filter was updated so that you can select specific usage occurrences. ReSharper also highlights broken or unfinished usages, which helps to determine what’s left to fix. Watch the video below to learn more about the updates to the Find Results window.

The Go to Everything and Go to Text popups support inline commands for advanced filtering of search results:
Filter in Go to Text

ReSharper’s Search & Navigation page adds a new option to open files in the preview tab from everywhere. This option is turned off by default.

Angular 2 templates syntax

ReSharper understands the following elements of Angular 2 templates syntax: template expressions, template statements, NgFor directive and template variables. Support is implemented for the template: property in Angular @Component decorator as well as for pure HTML referenced by templateUrl: property in @Component. Only relative paths are supported in templateUrl. For HTML pages, Angular markup is switched off by default and can be enabled in ReSharper Options (Code Editing | HTML | Editor).

The Rename refactoring works for component tags and for ‘foo’ in [].
Angular 2 Rename refactoring

Component attributes receive support for the Go to Declaration (F12) command.

Code completion works for Angular attributes and component tags, as well as for [attr., [style. and [class..
Code completion for Angular component attributes

Note that Angular 1 is not yet supported. You can use the AngularJS plugin for code completion and live templates, if Support Angular markup in HTML pages is set to ‘None’ in ReSharper options.

TypeScript and JavaScript support

We implemented full support for TypeScript 2.1 and initial support for TypeScript 2.2.

In TypeScript 2.1 ReSharper now understands mapped and indexed types, object rest and spread properties, updated logic for literal types, configuration inheritance, untyped imports, combined types normalization, partially annotated signatures, and control flow analysis for implicit any and implicit any arrays.
Finding usages of a symbol in TypeScript 2.1

In TypeScript 2.2 ReSharper supports ‘object’ type, JSX spread syntax and deriving (extends/implements) from signatures/tuples/intersections/mapped types.

The Rename refactoring in TypeScript works faster for local symbols and gets a new option to disable search for dynamic usage of TypeScript symbols in JavaScript files via a checkbox in the Rename dialog.

The Generate Code menu gets a new option to generate properties or read-only properties for TypeScript classes. The Generate Overriding Members command now calls ‘super’ whenever possible.
TypeScript generate menu

TypeScript gets highlights and quick-fixes for unused imports in ES6 style imports.

You can now speed up your coding in JavaScript and TypeScript by taking advantage of postfix templates:
Postfix templates in JavaScript

ReSharper also improves relevance of code completion items in TypeScript and JavaScript; supports Navigate to Implementing Members in TypeScript and Navigate to Function Exits in TypeScript and JavaScript.

Code Analysis

ReSharper’s File Status Indicator (the small icon at the top of the Error Stripe) receives a new context menu. With a right-click on the icon, you can quickly toggle not only ReSharper code analysis but also identifier highlightings and Visual Studio code analysis (lightbulb and squiggles). If there are code issues in the current file, you’ll also see commands for navigating between issues of the highest severity level.

File Status Indicator

Note that for large files ReSharper suspends code analysis automatically. In this case, you’ll see a gray Pause icon in the Status Indicator.

ReSharper C++

ReSharper C++ 2017.1 introduces initial support for the Open Folder functionality and CMake-based projects in Visual Studio 2017. If you want to use ReSharper’s unit testing capabilities, you’ll need to configure a test run on the new C++ Tests page in ReSharper options. Please note that support for this kind of projects is still experimental — do let us know if you experience any problems!

Speaking about performance, ReSharper C++ significantly improves its memory usage, including both memory footprint after indexing and memory traffic during indexing. Moreover, the reindexing process should trigger less often during the normal workflow, as ReSharper C++ will not, by default, invalidate includers after preprocessing directives change in an included file.

We’ve enhanced inspections and code cleanup:

  • The Update file header cleanup task and a set of cleanup tasks to fix common code issues are added
    C++ code cleanup tasks
  • Control flow inspections are updated to handle class fields in addition to local variables and function parameters
    Inspections for uninitialised field in C++ class
  • The inspection Declaration and assignment can be joined is implemented, together with an accompanying quick-fix
    Join declaration and assignment quick-fix
  • Introduced several custom C++ 11 attributes that can be used to mark printf-style functions (RSCPP-15890), functions with side effects (RSCPP-18615), and guard classes for which the Unused variable highlighting should be suppressed (RSCPP-18764)

The set of postfix templates is extended with beg..end, new, var, const_cast, dynamic_cast, reinterpret_cast, static_cast, make_shared, and make_unique. You can configure the availability of C++ postfix templates and other settings on the Postfix Templates page in ReSharper options.
Postfix templates options

ReSharper C++ also improves code formatting:

  • Indent size and style can be auto-detected
  • Indenting of preprocessor directives is now supported
  • Adds new formatter options: Indent namespace members, Space after parentheses in cast expressions and Break line in simple ‘case’ statement

Last but not least, ReSharper C++ supports inline commands for results filtering in Go to Everything and Go to Text popups, and grouping by kind of usage in the Find Results window.

For more details about new ReSharper C++ features please refer to the What’s New page.

dotMemory, dotCover, dotTrace, and dotPeek

You can now attach the dotTrace and dotMemory profiler to running applications using drag and drop. Simply drop a special icon onto the application window you want to profile.
Profile running apps with drag and drop

We’ve introduced dotMemory Command Line Tool (dotMemory.exe) which is extremely helpful when you need to automate the process of gathering memory snapshots. The most basic tool usage scenarios are described in our Help.

Old-style highlighting in dotCover 2017.1 is back again and supports the updated logic to display both tests coverage and test results. There’s also an option to switch between markers and colored background or to display both.

Highlighting using colored background

Finally, we’ve implemented support for portable PDB in dotPeek. You can generate PPDB files, explore the contents of the Portable PDB associated with the assembly, and use sources embedded in the Portable PDB for navigation purpose.

Support for Portable PDB

That wraps it up. Please download a free 30-day trial of ReSharper Ultimate 2017.1 and check the new features and improvements.

Download ReSharper Ultimate 2017.1

Comments below can no longer be edited.

24 Responses to Meet ReSharper Ultimate 2017.1!

  1. Avatar

    Paulo coehlo says:

    April 4, 2017

    Nice. But I will wait for first patch to this.
    Maybe tomorrow hehe ? 😉

    • Avatar

      Svetlana Emelyanova says:

      April 4, 2017

      Paulo, thanks. A bug fix update will be released not earlier than in 2 weeks 🙂

      • Avatar

        Paulo coehlo says:

        April 6, 2017

        I see some architecture problem.
        Because Resharper depends on extensions for example a style cop.

        This new version don’t support this extension.
        Extensions list don’t contain a style cop.
        When I install new version I see 11000 warnings in code analysis without settings from this plugin O_o.
        Maybe Resharper should be released with some core extensions ?

  2. Avatar

    Peter says:

    April 4, 2017

    Hi Svetlana,

    what font are you using in the Visual Studio recordings? Looks nice.

    • Avatar

      Svetlana Emelyanova says:

      April 11, 2017

      Hi Peter,
      Sorry for the delay in replying. We are using Gotham font.

      • Avatar

        Peter says:

        May 15, 2017

        Hi Svetlana,

        thanks for your reply. I think I will try it.

  3. Avatar

    Hennadii Omelchenko says:

    April 4, 2017

    After upgrade my continuous testing is not working properly, for some reason when I make my test red (intentionally), and then ‘fix’ it, it doesn’t get re-run (one thing I noticed, there might be more)

    • Avatar

      Svetlana Emelyanova says:

      April 4, 2017

      It’s a known issue and was mentioned in the post. We’ll fix it in the next major release.

      • Avatar

        Hennadii Omelchenko says:

        April 4, 2017

        The only thing that I can see is about continuous testing for .NET Core, and I am targeting full framework 4.6.1.

        Moreover, as I mentioned it does work when you change code under test. When it does NOT work though is when you change tests themselves.

        • Avatar

          Svetlana Emelyanova says:

          April 4, 2017

          Try Drop results in continuous testing session. And if it doesn’t help, please submit the ticket to our support.

  4. Avatar

    Stephen Kennedy says:

    April 5, 2017

    Is C# 7 support for Visual Studio 2017 only, or will it also work in VS 2015 (with Microsoft.Net.Compilers installed into each project if necessary)?

    • Avatar

      Svetlana Emelyanova says:

      April 5, 2017

      Yes, ReSharper inspections and quick-fixes for C# 7 will work in VS2015 as well.

  5. Avatar

    Dev says:

    April 6, 2017

    But it does not support VS 2017.1 ??? MSTests not working…

  6. Avatar

    Bruno Calzetta Larrieu says:

    April 18, 2017

    I keep getting that everything from ‘@angular/core’ is not used and then in the code it’s marked in red giving options to add imports that are not the once required.
    Any ideas?

    • Avatar

      Anton Lobov says:

      April 24, 2017

      Try clearing ReSharper caches (ReSharper -> Options -> Environment -> General -> Clear caches) and reloading your solution.

      Sometimes after huge NPM package updates R# doesn’t rebuild the TypeScript caches, we’ll fix this problem for the next version.
      Currently clearing caches and reloading the solution should help in this rare case.

      Also is can be one of:
      Both are fixed for the coming bugfix update.

      So, if just clearing caches won’t help you, bugfix update which comes supposedly this week should help you.

      • Avatar

        Bruno says:

        May 4, 2017

        Thanks, I’ll raise a bug, as it still happens with the latest bugfix update. Many thanks for replying

  7. Avatar

    Jaykumar Anbu says:

    June 14, 2017

    Recently i have upgraded visual studio 2017.
    But i am not able to use Resharper 9.1 license on Visual studio 2017,however it is working on vs2015.
    Is it possible to use my existing vs2015 resharper9.1 license key on vs2017?

    • Avatar

      Jura Gorohovsky says:

      June 14, 2017

      You need ReSharper 2017.1 or later to install into Visual Studio 2017 (this will work in 2015 as well).

  8. Avatar

    Benjamin Ferguson says:

    October 31, 2018

    So i have visual studio 2017 and i got the Student edition of Resharper. When i downloaded all the files, all my C# projects are cluttered with Errors. I even started a blank project and its saying the code that visual studio supply is wrong when its fine. Does the student edition not include C# help or something because its acting like the code is from a different language or something.

    • Avatar

      Benjamin Ferguson says:

      October 31, 2018

      Using Systems; says all using directives must be in a namespace.
      Static void main says Method must habe a documentation header and a access modifier.

      • Avatar

        Maarten Balliauw says:

        October 31, 2018

        Looks like a VS quirk. Can you try closing Visual Studio, clean bin and obj folders, then start it again?

Discover more