What′s New in ReSharper

ReSharper 2017.1 delivers the best support for Visual Studio 2017 RTM. It brings new C# 7 inspections and quick-fixes, supports .NET core unit testing in VS2017, and introduces many code formatting improvements including initial EditorConfig support. Changes also include updates to navigation and search, full support for TypeScript 2.1, and initial support for TypeScript 2.2 and Angular 2.

Download
Free 30-day trial
Take a tour

ReSharper 2017.1

Switching switching a file's target framework context

Visual Studio 2017 RTM support

Full support for Visual Studio 2017 new features is finally here. You can now work with solutions loaded in a lightweight mode. When you use the Open Folder option, ReSharper sees all files in the folder and supports .xml and .js file types. Move to Folder refactoring works in this mode.

ReSharper respects the current target framework context. This is set by the drop-down at the top of the editor window, and can change settings such as the assemblies being referenced, as well as symbols defined in the build and pre-processor.

Convert to local function

C# 7 support

ReSharper receives a lot of new inspections to comply with the C# 7 compiler. For example, it can detect typos in tuple variable names when overriding a method or implementing an interface.

ReSharper supports local functions with a new quick-fix to Convert a read-only delegate variable into a local function, as well as two new context actions:

  • Convert lambda expression or anonymous method into a local function
  • Convert local function into a regular method

The Join null check with assignment quick-fix 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.

Run unit tests in all target frameworks

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 4x 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.

File Formatting Info

EditorConfig support

EditorConfig support is enabled by default. ReSharper understands standard EditorConfig properties, most of Roslyn EditorConfig properties, and provides a rich set of custom EditorConfig properties for much more granular configuration of formatting rules. This means that you can maintain the entire configuration of formatting rules in EditorConfig files.

The File Formatting Info window displays the scopes and properties defined in all active .editorconfig files. This window also shows the source of indentation settings and its value, and the status of indent autodetection.

Tabs and indents settings

Indent autodetection and code style improvements

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.

When you reformat a part of code in a file, or when code is auto-formatted on editing or pasting, ReSharper can calculate and apply indentation based on the existing indents in that file. This feature comes in handy when you want to contribute to existing projects where indentation differs from your settings.

Contextual configuration of formatting rules is available in С#, C++, JavaScript and TypeScript. Press Alt+Enter over the selected block of code that you need to reformat, and then choose Format Selection | Configure in the actions list to see all formatting rules that affect the code.

Code cleanup dialog box

Code cleanup, new code style and formatting options

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.

ReSharper applies its 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 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.

Finally, we've improved C# code formatting engine 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
Grouping by type of usage and new filter options

Navigation and search

The Find Results window gets a new option to group search results by kind of usage, new filters to select occurrences of a specific usage, and using quotes to search for exact matches.

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.

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

Rename refactoring in Angular

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).

Code completion works for Angular attributes and component tags, as well as for [attr., [style. and [class.. Component attributes receive support for the Go to Declaration (F12) command. The Rename refactoring works for component tags and for 'foo' in [class.foo].

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.

Finde usages of the object rest property

TypeScript and JavaScript support

  • Full support for TypeScript 2.1: 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
  • Initial support for TypeScript 2.2: 'object' type, JSX spread syntax and deriving (extends/implements) from signatures/tuples/intersections/mapped types
  • Inspection and quick-fixes for unused imports in TypeScript ES6-style imports
  • Postfix Templates in JavaScript and TypeScript
  • Improved relevance of code completion items in TypeScript and JavaScript
  • 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
  • Navigate to Implementing Members in TypeScript
  • Navigate to Function Exits in TypeScript and JavaScript
  • The Rename refactoring in TypeScript works faster for local symbols and gets a new option to disable dynamic search for TypeScript
Context menu on status indicator

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.

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

Control flow inspections for class fields

ReSharper C++ updates Ultimate

ReSharper C++ 2017.1 finalizes Visual Studio 2017 RTM support and learns to work with the Open Folder mode and CMake projects. Changes also include improved performance, extended set of postfix templates and code cleanup tasks, and updates to control flow inspections.

Learn more about ReSharper C++ 2017.1.

Command-line profiler

Command-line profiler Ultimate

dotMemory 2017.1 includes the dotMemory.exe tool that allows you to profile from the command line. The tool is extremely helpful when you need to automate the process of gathering memory snapshots, e.g. if you want to make profiling a part of your continuous integration builds.

Attach using drag and drop

Profile running apps with drag and drop Ultimate

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

Download
Free 30-day trial

ReSharper 2016.3

Visual Studio 2017 RC support

Visual Studio 2017 RC initial support

All ReSharper Ultimate 2016.3 products can now be installed into Visual Studio 2017 RC. Note that lightweight solution load and new .NET Core unit testing in Visual Studio 2017 RC are not yet supported, and both of these issues will be addressed in further updates.

At the same time, ReSharper Ultimate 2016.3 continues to support Visual Studio 2010, 2012, 2013, and 2015.

Dispose pattern

New code generation actions for C# and VB.NET

The Generate menu (Alt+Ins in a class) is extended with 3 new actions:

  • Relational members helps you automatically overload relational operators (>, <, , ) and/or implement IComparable and IComparable<T> using selected fields and properties.
  • Relational comparer creates a comparer class derived from Comparer<T> using selected fields and properties.
  • Dispose pattern helps you generate an implementation of IDisposable with optional nullability checks and destructor for unmanaged members.

Аctions that help you implement IDisposable, IEquatable<T> and IComparable<T> are also available with Alt+Enter on highlighted code.

The action that generates constructors gets a small update with an option to check parameters for null. If checked, it will generate guard code that throws ArgumentNullException in the constructor.

C# 7 digit separators

Early support for C# 7 and VB.NET 15

ReSharper 2016.3 now understands VB.NET and C# 7 binary literals and digit separators. It adds support for C# 7 local functions and enables a lot of code inspections in their context, such as Possible System.NullReferenceException, Access to disposed closure, and Access to modified closure. C# 7 out variables, pattern-matching in is expressions and switch cases are also supported.

Introduce from all unused parameters

New quick-fixes and context actions

ReSharper 2016.3 adds a new quick-fix to introduce fields and auto properties from all unused parameters. This is an extension to the existing quick-fix that used to work for only one parameter, but now can be can be applied to all unused parameters at once. The Introduce property quick-fix also includes a Configure default menu item, which will set what kind of property is generated by default.

There's also a new context action on fields of type Lazy<T> to introduce a property to encapsulate fieldname.Value.

Transform Parameters refactoring

Transform Parameters refactoring

Transform Parameters refactoring combines and replaces two other refactorings: Transform Out Parameters and Extract Class from Parameters.

It rewrites a method's parameters, changing incoming parameters to a new class, or a tuple, and optionally creating a new class for return value and any out parameters.

As usual, the Transform Parameters refactoring can be invoked from the Refactor This (Ctrl+Shift+R) menu.

.NET Core unit testing

.NET Core unit testing

ReSharper's unit testing features are finally available for xUnit and NUnit-based unit tests in .NET Core and ASP.NET Core 1.0.x projects in Visual Studio 2015. This lets you run, debug and manage tests in a way you're used to with your .NET Framework projects.

However, if you're targeting .NET Core 1.1 in Visual Studio 2017 RC, you'll have to wait for the next ReSharper update to run and debug unit tests in this environment.

Async Go to Usages

Navigation and search: async usage search results

ReSharper's usage search engine is updated to make finding references of heavily used symbols easier.

In particular, as soon as you invoke Go to Usages of Symbol (Shift+Alt+F12), the Show in Find Results button becomes available in the pop-up. If the search for usages is going to take some time, you can just click this button or press + on the numeric keypad and continue working with the code while the search runs in the Find Results window.

The Find Results window now works asynchronously too, meaning that you can work with the results tree while usages search is still in progress.

Go to Text supports more file types

Other updates in navigation and search

  • New formats of content files (.less, .hbs, .coffee, .scss, .dart, .as, .styl) are supported in Go to Text.
  • Recent Files and Recent Edits pop-ups now show the path to the file. In Recent Files, you can delete entries using the Delete key. Recent Edits can also show all edits in the same method as a single entry.
  • A setting to remember the last search in Go to Everything, Go to Text and other search actions (this behavior is turned off by default for now).
  • Structural search & replace: in C#, string and integer numeric literals can now be matched by value. Literals representing the same integers but written with different suffixes, in different radixes, with or without digit separators are now considered similar.
Build Results tool window

ReSharper Build improvements

ReSharper Build receives several updates in this release. First, the results of a build are now displayed in a separate Build Results window, which lists build warnings and errors. Toolbar buttons and grouping options give you a lot of control over how you want to see the results.

ReSharper Build now uses its own implementation of NuGet Restore. Previously, we would use Visual Studio's NuGet integration to perform restore, but this only worked in Visual Studio 2015. Now, the restore mechanism works in all Visual Studio versions (provided that you have .NET Framework 4.5 or higher installed).

Build options were reworked as well. For example, you can now choose when the Build Results window is shown, such as only when there are errors. Another interesting new option is to log the build to either the Output window, or a file.

Surround with type guard quick-fix

Better TypeScript, JavaScript, JSON support

  • Support of TypeScript 2.0.2 ("2.0 RC"): boolean, number and enum literal types.
  • Go to Implementation now works for TypeScript types too: you can jump from a base type or member to any of its end implementations, bypassing intermediate steps in the inheritance chain.
  • The Surround with type guard quick-fix lets you quickly add type guards to disambiguate unresolved symbols in TypeScript.
  • You can use Tab and Shift+Tab keys to enable structural navigation in your TypeScript, JavaScript or JSON code
  • The Encapsulate Field refactoring, which helps you quickly create a property for a field and optionally replace usages of the field, now works in TypeScript.
  • Optimized memory usage for TypeScript caches.
  • Code completion for TypeScript literal types as well as a number of formatting fixes for JSX/TSX files.
  • Dynamic completion of package names in project configuration files (project.json, package.json and bower.json)
Language injection options

Improved language injections

In addition to regular expressions and HTML, ReSharper 2016.3 lets you inject CSS, JavaScript and JSON in C#, JavaScript, and TypeScript strings. To mark a string literal as containing specific language, use the Mark as context action or a special comment directive: //language=javascript|html|regexp|jsregexp|json|css

You can also add prefix= and postfix= in the comment to make ReSharper resolve the string syntax as if prefix and postfix were already a part of the expression inside the string.

Finally, ReSharper automatically injects languages in certain known scenarios, such as injecting JavaScript into AngularJS templates, or CSS in jQuery's $[]indexer.

There is also a new options page for language injections, allowing you to selectively enable or disable built-in automatic injections.

Open from NuGet package source

ReSharper tool windows

  • Assembly Explorer (ReSharper | Windows | Assembly Explorer) adds a new way of loading assemblies directly from nuget.org or from any NuGet package source. This feature has also been available in recent versions of dotPeek.
  • To-do Explorer: each to-do pattern can now have a category ("Normal", "Edit", "Error", "Question" or "Warning") with its own color. Colors are the same in the To-do Explorer and the editor and can be configured in Visual Studio’s Fonts and Colors options page.
  • Stack Trace Explorer now lets you open external stack traces even faster. If you copy a stack trace that contains symbols from the currently opened solution and then switch focus to Visual Studio, ReSharper will automatically load the stack trace to the Stack Trace Explorer without making you hit any shortcuts. This behavior is configurable under ReSharper | Options | Tools | Stack Trace Explorer.
  • Use ReSharper Build
  • Type in the Alt+Enter menu
Feature suggestion: use ReSharper Build
Feature suggestion: type in Alt+Enter menu

Feature suggestions

We included a few tips on how to use ReSharper more effectively. When you don't use one of the basic ReSharper features we think you can benefit from, ReSharper shows you a little pop-up window with a tip. From there, you can enable suggested features, open a documentation page or disable any further tips.

RelativePanel control completion

XAML/UWP improvements

ReSharper now correctly resolves element name references, detects binding errors, and provides code completion for the RelativePanel control in Universal Windows Platform applications. In other news, ReSharper no longer displays false reports of duplicate property declarations in XAML, which helps clean up the Errors in Solution tool window.

Third-party code: skipped code

Usability of options

  • JavaScript and TypeScript get a new option page that improves how ReSharper works with third-party library code and generated code. In the Third-Party Code page, you can mark a JavaScript, TypeScript or JSON file by name, file mask or even an entire folder as either "skipped" or "library".
  • Context actions for different languages can now be enabled and disabled in a single Context Actions page. You can also use the search box at the top of the page to quickly find specific actions.
  • Inspection Severity page was redesigned to incorporate more languages.
Indentation options

More ReSharper updates

Other updates to ReSharper include the following:

  • A new typing assist for C# automatically inserts $"" when you type $, and sets the caret between the quotes: this helps you create an interpolated string literal by typing just a single character.
  • Smart name resolution for ambiguous namespaces in Visual Basic 14 projects. ReSharper infers which namespace you meant from conflicting choices based on the type you are using. For example, if you use Threading.Thread, you clearly meant System.Threading.Thread, and if you use Threading.Dispatcher, ReSharper understands that you meant System.Windows.Threading.Dispatcher.
  • #Disable Warning and #Enable Warning directives in VB.NET are now respected.
  • Indenting of nested for, foreach, while, lock statements is now disabled by default with options to restore the old behavior. We also added new option for indenting type parameter constraints and fixed a few bugs introduced in ReSharper 2016.2 by a new indenting engine.
Support for Catch unit testing framework

ReSharper C++ updates Ultimate

ReSharper C++ 2016.3 adds typedef refactorings, introduces postfix completion, starts to support the Catch unit testing framework, and integrates with Visual Studio 2017 RC.

Learn more about ReSharper C++ 2016.3.

.NET Core support

.NET Core profiling Ultimate

dotMemory and dotTrace now let you profile .NET Core applications for memory issues and performance bottlenecks, and dotCover supports code coverage on this type of applications in Visual Studio 2015.

To start profiling, simply select .NET Core Application on the Home page in dotTrace or dotMemory, specify your .NET Core executable, and click Run.

Learn more about dotMemory and dotTrace 2016.3.

Improved code coverage highlighting. Showing test results

New code coverage highlighting Ultimate

A new highlighting engine in dotCover 2016.3 reveals both coverage status and unit test status. A marker in the text editor shows red if any tests related to the current statement are failing, green if all tests are passing, and grey if there are no tests covering this statement.

Learn more about dotCover 2016.3.

Download
Free 30-day trial

ReSharper 2016.2

Support for ASP.NET Core 1.0 RTM and tag helper syntax

ASP.NET Core 1.0 RTM

ReSharper 2016.2 adds initial support of ASP.NET Core 1.0 RTM. ReSharper should now correctly resolve project references in projects of this type and provide its core set of features, including refactorings, code inspections and navigation.

Tag helper syntax is now also supported in terms of code completion, navigation, search and refactorings.

However, running .NET Core unit tests is not supported so far: this is going to be addressed in the next update.

Structural navigation with Tab

Structural navigation with Tab

ReSharper now allows using Tab and Shift+Tab keys to jump between logical pieces of your code, similar to how you navigate in your web browser.

For example, when editing a for statement, Tab will select the initializer statement, then the terminating condition and then the iterator statement. Shift+Tab will make these selections in reverse order.

When the cursor sits before the first non-whitespace character in a line, you can still use Tab for indentation.

Learn more: how ReSharper makes Tab great again

Go to Text for textual search

Go to Text for textual search

A new navigation action, Go to Text (Ctrl+T,T,T), lets you quickly find and navigate to any text in source and textual files that are included in your solution. Similar to other navigation commands, if there are too many matching items, you can hit + on the numeric keypad to explore results in the Find Results window.

Advanced ReSharper users may recall an older plugin called Go to Word, and the new navigation action re-implements the functionality of this highly popular plugin right inside the mainline ReSharper.

Warnings in solution-wide analysis

Warnings in solution-wide analysis

If you're using solution-wide analysis, you know that normally, its red status bar indicator turns green as soon as the last error in solution is fixed.

Starting from 2016.2, you can make the indicator stay orange as long as your solution contains any unresolved warnings: both actual compiler warnings and ReSharper's inspections with the Warning severity level.

It is still up to you whether to enable the solution-wide analysis and whether to make it show warnings: you can right-click the status bar indicator to configure everything.

C# typing assistance

More C# typing assistants

ReSharper 2016.2 introduces a set of new C# typing assistance features that correct subtle mistypes as you enter code.

For example, if you happen to type MethodName(.), this will be automatically replaced with MethodName()., allowing you to keep entering a call chain without having to deal with an invalid syntax error.

Similarly, ReSharper will correct a mistyped @$ prefix to $@ in verbatim string interpolations.

Check all parameters for null

New quick-fixes and context actions

A ReSharper update without a new set of code inspections, quick-fixes and context actions is next to unthinkable, and ReSharper 2016.2 is no exception.

New Alt+Enter commands help simplify string interpolation inserts, revert the order of iteration in simple for loops, and fix awaiting of a void method by making it return a Task. Along the way, existing quick-fixes that make methods async were also revised to suggest using Task instead of void.

In other news, you can now check all parameters of a method for null (or empty strings) with a single context action. More than that, uncommenting and deleting comments can now also be done with Alt+Enter actions.

Support for XML doc inheritance

XML documentation inheritance

ReSharper 2016.2 improves support for the <inheritdoc/> tag in XML documentation comments, which is a good alternative to copying documentation from base types/members to derivatives:

  • There is now a context action to add an <inheritdoc/> to an inherited type member.
  • ReSharper can generate missing members and overriding members along with <inheritdoc/> comments if you want it to.
  • Quick Documentation can now correctly work on members that not only inherit documentation from their base members but refine it with additional or overriding comments.
Mark a reference as used at runtime

Safer Optimize References refactoring

Based on popular demand, ReSharper 2016.2 adds a way to mark references as used at runtime. This is important if you're using dependency injection frameworks.

By marking all references that are implicitly loaded, you can safely run ReSharper's Optimize References and Remove Unused References commands without breaking references that are required at runtime.

Refactor to partial type

Move members between type parts

A new refactoring, Extract Members to Partial, helps you quickly move type members between different type parts if partial classes are in use in your solution. Based on your input, the refactoring will use existing or create new type parts.

You can even invoke the refactoring over a #region to move all region members into a new file with a name inferred from the region name.

Revised surround templates

Revised surround templates

If you need to surround a piece of code with a template, you can now just select the code, and type in the name of a template you need: no extra shortcuts required.

In other news, a single template can now be used for for creating code (as a live template) and for surrounding existing code (as a surround template).

Injecting HTML or RegEx via comments

HTML and RegEx injection

You can now take advantage of HTML code analysis inside string literals in .cs, .js, and .ts files. Just put a comment /*language=html*/ ahead of a string literal that contains HTML, or use the Mark HTML here context action to enjoy syntax highlighting, error detection and other kinds of ReSharper's HTML support right inside the string literal.

Regular expression assistance in string literals can now also be enabled when you put a comment /*language=regexp|jsregexp*/ before a string literal that contains a C# or JavaScript type regular expression.

JSON value helpers

JSON value helpers and schema catalogs

JSON value helpers allow you to tell ReSharper to provide code completion or validation for your own JSON files. You can add a helper in the JSON Value Helpers options page, matching based on a filename mask and/or schema match. Custom JSON schema catalogs can also be added in JSON options.

Support for CSS custom properties

CSS custom properties

ReSharper's code inspections, quick-fixes, code completion, navigation, search and refactorings are now made available in CSS custom properties (also known as variables).

For example, in terms of code analysis, ReSharper helps you remove unused custom properties, detect undeclared custom properties and replace their usages with fallback values.

In addition, ReSharper 2016.2 introduces a set of fixes for improved CSS spec handling.

TypeScript 2.0.0 support

TypeScript 2.0 support

ReSharper 2016.2 completes support of language features available in TypeScript 2.0.0, such as abstract properties, this for functions, control flow-aware type guards, path mappings, optional class members, and the never type.

Code generation options in TypeScript code completion

More JavaScript and TypeScript improvements

Other improvements in terms of JavaScript and TypeScript support include:

  • Generating TypeScript code, such as overrides and lambdas, with code completion.
  • Completion for package versions in bower.json manifest files.
  • Improved Find Usages and Rename for union and intersection types.
  • A new quick-fix to implement missing members as abstract.
  • Go to Declaration and Find Usages work correctly with type aliases.
  • When renaming JavaScript function parameters, ReSharper learns to update the corresponding JsDoc items.
Assembly dependency diagram

Assembly dependency diagram

ReSharper 2016.2 adds the assembly dependency diagram to the family of its dependency analysis tools.

You can invoke the diagram on selected assemblies in the Assembly Explorer and explore connections that are established between the assemblies by virtue of their references.

Process Explorer in ReSharper

Process Explorer

The Process Explorer window, which was previously only available in dotPeek, displays all currently running processes, allows exploring their modules and decompiling those of them that are .NET assemblies.

You can choose to show or hide native processes and modules, or turn on process hierarchy view.

Filter the list to find a module or process that you're looking for, and then add its assemblies to Assembly Explorer for further investigation.

Improved IL code viewer

More ReSharper updates

In other news, ReSharper 2016.2:

  • Makes string interpolation suggestions, quick-fixes and context actions available in VB.NET.
  • Extends the C# formatter with new options for indenting of parentheses and code inside them; controlling spaces before and after ++ and -- operators, as well as before and inside parenthesis of checked and default expressions.
  • Helps rearrange code in interpolated string inserts and in expressions with 3 and more operands. "Greedy brace" now works for the opening brace, braces of types and namespace declarations.
  • Makes IL code displayed in the IL Viewer more readable: types, members, type parameters, and local variables are now highlighted with distinct colors; and loops are better distinguishable with indents and comments.
Inline Variable refactoring in C++

ReSharper C++ updates Ultimate

ReSharper C++ 2016.2 adds the Quick Documentation pop-up to display documentation based on Doxygen comment blocks without having to navigate to a symbol's definition.

The new version also introduces the Inline Variable refactoring, and improves automatic completion so that it suggests symbols that are not included in the current file.

There are also certain performance improvements as ReSharper C++'s code analysis engine has been redesigned. For example, this is expected to make ReSharper C++ analyze several times faster when you open the Unreal Engine project for the first time.

Learn more about ReSharper C++ 2016.2.

Download
Free 30-day trial

ReSharper 2016.1

Reformat, apply code style or clean up a selection

Code style features

ReSharper 2016.1 incorporates a diverse set of changes that have to do with how you manage and apply your code style preferences. These changes include:

  • New code style settings, code inspections and quick-fixes to set a preferred style for using named arguments, braces around single nested statements, and grouping of attribute sections.
  • The growing set of configurable code styles can now be applied with a single command: ReSharper | Edit | Apply Code Style. This command (which is currently limited to C#) will enforce your preferences for explicit types vs using var, CLR type names vs type keywords, and other styles configurable under ReSharper | Options | Code Editing | C# | Code Style.
  • An explicit action for reformatting code: to enable a quick, routine reformat without necessarily invoking the powerful Code Cleanup, we provided a new action, which is now available from the main menu (ReSharper | Edit | Reformat Code) or with a keyboard shortcut.
  • Reformat Code, Apply Code Style and Cleanup Code commands are now all available as context actions when you make a code selection in the editor and press Alt+Enter.
A new ReSharper action to convert string concatenation to interpolation

Actions to manipulate strings

ReSharper 2016.1 adds a bunch of Alt+Enter actions that help you switch between different ways of handling strings, such as interpolation, concatenation, and string.Format(). For example, these actions help you:

  • Refactor a string interpolation expression to a string.Format() call.
  • Convert string concatenation to string interpolation.
  • Simplify nested string interpolation.
  • Remove redundant verbatim identifiers, locally or in a wider scope.
  • Make a string equality check case-insensitive.
  • Insert new arguments into string interpolation expressions.
  • Use string interpolation expressions with various logger frameworks.
Context actions to check argument values

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.
  • For collection parameters, ReSharper helps set up a check against empty collections.
Converting a JSON string to a Newtonsoft JSON.NET object

Actions to convert strings to objects

ReSharper 2016.1 introduces two similar context actions that help convert your code to take advantage of the LINQ to XML and JSON.NET APIs.

One of these actions, which is available wherever you have valid XML inside a string literal, lets you convert this string to a LINQ to XML object (using XElement, XAttribute etc.)

The second action in the duo helps convert a JSON string to a Newtonsoft JSON.NET object. The action is only available if your project references Newtonsoft.Json assembly (which you can install from the NuGet Gallery).

Combined with Smart Paste that is also introduced in ReSharper 2016.1, these two actions complete the workflow of transferring existing XML or JSON into C# code.

Context actions to split or join attributes

More context actions

There's an assortment of new Alt+Enter actions (both context actions and quick-fixes) that help you perform a variety of transformations, such as:

  • Comment out a code selection.
  • Uncomment a comment under caret. (Both this and the previous action are effectively Alt+Enter equivalents of dedicated ReSharper shortcuts for commenting code.)
  • Delegate implementation of a non-implemented interface to a new field of the corresponding type.
  • Split or join attribute sections.
  • Create another part of a partial type.
  • Add braces around switch case statements.
WCF-specific code inspections and quick-fixes in ReSharper

WCF-specific actions

ReSharper 2016.1 adds a set of code inspections, quick-fixes and context actions that address some of the most common issues in WCF service development.

  • ReSharper will help you detect and fix WCF service methods that are marked as [OperationContract(IsOneWay=true)] but return anything other than void or Task.
  • If you have a [ServiceContract] interface without any [OperationContract] members, ReSharper will 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.
  • There are new context actions to help you annotate all members in a [DataContract] type with either [DataMember] or [EnumMember] attributes, which is especially useful in lengthy [DataContract] types.
Invert Boolean Member refactoring

Invert Boolean Member

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.

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

Smart Paste ensures the correct escaping in string literals

Smart Paste

ReSharper can now help you ensure the right escaping in string literals that you copy/paste around your code. The feature works in C#, VB.NET, JavaScript, XML, XAML and HTML files, making sure to respect the different ways of escaping illegal characters that are used in different contexts.

For example, you can copy a piece of text or XML that contains double quotes, paste it into a string literal in C#, and have ReSharper automatically escape all the quotes.

This also works when you're pasting a piece of C# code into an XML doc tag: Smart Paste will escape any generics and lambda syntax, as well as logical operators and anything else that is fine in C# but not allowed in XML values.

Other things that ReSharper can escape for you include file paths and line breaks.

NuGet support in Optimize References and Remove Unused References

Optimize Nuget References

Optimize References learns to handle NuGet references that are now displayed in the same tool window as all the regular references that a project contains. ReSharper also adds a new grouping to show possibly unused references that have dependencies in the project, and thus cannot be considered redundant. ReSharper tells you exactly what particular dependencies from a package are actually used in your project.

In addition, the Remove Unused References refactoring now supports NuGet references as well.

Intermediate Language viewer in ReSharper

IL Viewer

The Intermediate Language Viewer, which first appeared in dotPeek, is now available in Visual Studio. You can use the viewer both for drilling down third-party library code, and to display IL that corresponds to your own source code (note you'd have to compile first).

To check out how IL Viewer works, choose ReSharper | Windows | IL Viewer on the menu.

ReSharper's test runner supports xUnit out of the box

Out-of-the-box xUnit

The xUnit.net test framework has seen a large rise in popularity recently, including being the framework of choice for Microsoft's cross platform, open source .NET Core project, and is the officially supported way of running tests for DNX projects.

While ReSharper has had support for xUnit.net for many years, it has always required installing a separate extension. Starting with version 2016.1, ReSharper provides support for xUnit.net directly in the product. This means ReSharper will discover your tests, and allow you to run and debug them, right from the editor, without requiring any extra extensions.

Furthermore, ReSharper Ultimate customers will also be able to profile tests, get code coverage and use xUnit.net in Continuous Testing sessions.

ReSharper starts to understand VB.NET 14

VB.NET 14

Having supported C# 6 quite a while ago, we are now getting up to date with the development of Visual Basic .NET.

ReSharper 2016.1 completes VB.NET 14 support by starting to understand language features such as string interpolation, multi-line strings, null-conditional operators, partial modules and interfaces, and year-first date literals.

JSON support in ReSharper 2016.1

JSON support

ReSharper 2016.1 is expanding its technology reach by supporting JSON files and schemas in all supported versions of Visual Studio (2010-2015).

JSON and JSON schema support currently ranges from things as basic as syntax highlighting in older Visual Studio versions, to more sophisticated features like formatting and rearranging (for example, you can move object properties or arbitrary selections around), code inspections and quick-fixes, as well as code completion that is aware of schemas, paths, regular expressions and packages.

To help you get a quick idea of any JSON file, we have enabled ReSharper's File Structure window to work with files of this type.

Initial support for Node.js in ReSharper

Initial support for Node.js

ReSharper 2016.1 introduces initial support for Node.js.

All ReSharper goodies you are well familiar with, like completion, code inspections, quick-fixes, and navigation features are now available for Node.js.

Improved JSDoc support

JSDoc improvements

JSDoc support is further improved in ReSharper 2016.1. ReSharper can now parse generics, HTML markup, and parameters with properties in your JSDoc comments. Everything that ReSharper infers from JSDoc becomes immediately available in code completion suggestions, parameter information tooltip, etc.

Improved JavaScript and TypeScript formatting settings

More on JavaScript and TypeScript

ReSharper's support of JavaScript and TypeScript keeps evolving, both in terms of width and depth. The following improvements highlight this release:

  • JavaScript and TypeScript formatter settings became much more granular. You can now specify the right margin for your code and define whether and how various code constructs should be wrapped.
  • Rename refactoring can now rename files corresponding to TypeScript types, and Find Usages is aware of TypeScript implementations and overrides.
  • ReSharper now correctly handles TypeScript modules installed via npm, which is crucial in AngularJS development.
  • Full support for TypeScript 1.7 and 1.8, including type parameter constraints, stateless JSX components, augmenting global/module scope, string literal types, and this-based type guards.
  • Initial support for experimental ECMAScript syntax, such as comprehensions, decorators, class properties, exponentiation operator, rest and spread properties for object literals.
  • Experimental support for parts of TypeScript 2.0: readonly properties, implicit indexers, private and protected constructors, abstract properties, and nullable types.
  • Better support of TypeScript and JavaScript in older releases of Visual Studio: for example, ReSharper can now highlight JSX, as well as ECMAScript 6 and 7 in Visual Studio 2013.

Improved error highlighting

ReSharper 2016.1 comes with improved highlighting ranges for errors involving complex types. Previous versions of ReSharper would highlight the entire statement containing an error, which would hinder locating where the error was coming from, especially with complex generic types.

From now on, ReSharper highlights only the part of type that is erroneous (however, watch out for Visual Studio 2015's own error highlighting) and offers more ways to fix mismatching types.

Async Find Code Issues

Previously, when you used ReSharper's Find Code Issues command in any given scope, you had to stop and wait until the code analysis was over.

Starting with ReSharper 2016.1, Find Code Issues works in the background, in a manner similar to Find Usages. This lets you keep editing or navigating your code while ReSharper runs its analysis and populates the Inspection Results tool window in the background.

Download
Free 30-day trial