As many may have noticed, significant changes are now taking place in the .NET world. The appearance of Roslyn, C # 6, ASP.NET vNext, Visual Studio "14" and other technologies inspire ReSharper to take new steps in its development and support of various languages and platforms.
In this regard, we invite everyone to join the
program of early access for ReSharper 9. In this post we will discuss the main features of the new version.
TL; DR support for VS "14", C # 6 and regular expressions has been added to ReSharper 9, improved support for JS / TS and global changes (bulk fixes), added a new editor for code formatting and new navigation options, as well as all of our .NET products move to a new common platform.
')
C # 6 support

We have already published a
review blog post about support for C # 6 , so here’s a list of things that ReSharper 9 currently supports (we remember that C # 6 has not yet been released, and the final feature is hard to guess at the moment):
- Support for the conditional access operator (?.) Allows us to write null chain checks (also known as the Maybe monad). ReSharper is not only familiar with this new design, but also helps you to safely update your code by replacing or removing unnecessary checks with
null
.
- Supporting class members written through expressions (expression-bodied members) simplifies the process of creating elements based on simple single-line expressions. Resharper provides an opportunity to use this new construct, as well as help to transform large pieces of already written code with this new paradigm.
- Car properties received new opportunities for initialization, as well as the ability to automatically delete private setters, and thereby get really uncomfortable auto-properties.
- Support for static
using
(finally, you can write Sin
instead of Math.Sin
), filters for exceptions and other new C # 6 constructions.
Global Actions and Fix in Scope

In ReSharper 9, the global change mechanism is extended (
Fix in Scope ), in order to make extensive changes to large amounts of code easier and easier. Improvements include:
- Bulk Import (bulk import mechanism) ensures that by importing a large piece of code, ReSharper will go through the inserted code and add the necessary import directives for all types and elements — including extension methods.
- Redundant code removal now exists as a separate option, so if you hover over this extra qualifier
this.
, from this place you can remove this.
qualifiers this.
globally (within the file / folder / project / solution), and remove all unnecessary elements (not only this.
but also extra using
directives, etc.) in similar ranges of application.
- Global name changes allow you to quickly import someone else's code and massively change the naming styles of methods, fields, etc. to your liking.
- Move to File / Namespace (mechanism for moving code to another file or namespace) now ensures proper processing of files containing several class declarations.
- Deleting regions is another global action that allows you to delete all uses of regions within a file, project, or solution.
Navigation improvements

Changes in navigation include:
- Universal Go to Action - now the shortcut Alt + Enter provides a list of common actions, as well as the ability to search through all actions.
- Navigate to Exposing API is a new navigation option that allows you to search for all methods that can return a specific type.
- Assembly Explorer is now even more closely integrated with Resharper. He got his own navigation options in the Navigate To menu as well as in the Studio Solution Explorer.
- The Go to Type mechanism now helps with navigation on generics, so if you are standing on a variable of type
List<Foo>
, it will prompt you to navigate either to List<T>
or to Foo
. - Find Usages (search for symbol usage) now has a setting for using the Studio Preview tab (Preview Tab), and also no longer blocks the UI during a long search.
- The Find Results window no longer produces tabs when searching for the same item, and, finally, you can filter items in the resulting list.
Code Style Settings

The following settings appeared in 9k:
- Settings for using var - now there are 3 of them (for built-in types, simple types and all others). This allows you to more precisely control how and where
var
related hints and correction options appear. - Instance member qualification - the setting is responsible for which class members apply
this.
qualifier this.
- Static member qualification controls how we access static class members: either through the name of the class where the element is declared, or through the current class.
- All three previous settings are available as profile settings in the Code Cleanup mechanism.
- Finally, to control the layout of the elements in the file, we completely rewritten the old XML editor and instead embedded a new visual interface.
Regular expression support

ReSharper has learned to work with regular expressions, so now you no longer need third-party programs. Here is what he can do:
- Syntax highlighting is available for regular expressions, including partial line highlighting for error indications.
- Auto-completion code simplifies the process of selecting different substitutions. Also added auto completion for named groups!
- Escaping Quick-Fix allows you to quickly replace the
\
characters used for substitutions with valid ones in C # using verbatim lines (lines starting with @
).
- A separate validation utility allows you to quickly check the test input options for matching the regular expression and parse them into matches and groups.
- Converting to precompiled expressions allows you to improve performance by transferring regular regular expressions to
Regex
static instances.
TypeScript and JavaScript support enhancements

Here are some improvements to TypeScript support:
- New inspections and correction capabilities cover more than 270 different errors.
- New refactorings include Introduce Field , Copy Type , Move Refactorings (moving the code to a module / file, moving to the appropriate files, moving to a folder), Rename File , and the type import mechanism for the inserted code.
- Code generation for TypeScript supports automatic interface implementation / generation of missing elements, as well as the generation of constructors and overriding elements.
- The live templates mechanism supports two new usage ranges (scope) - Module Member and Type Member. ReSharper also supplies several of its TypeScript templates for generating classes,
enum
, interfaces, and modules.
- Parameter Info for TypeScript now supports not only function arguments, but also type arguments.
- Added support for specialized signatures (specialized signatures) .
In addition, ReSharper provides a mechanism for
automatically converting code from JavaScript to TypeScript , as well as early support for ASP.NET vNext.
Unified installer
We plan to provide users with one unified installer for all our .NET products (ReSharper, dotTrace, dotMemory, dotCover and dotPeek). During the installation, you can choose what you want to install. Also, all our products now use one common platform, which saves computer resources when several of our applications run simultaneously.
Please note that the first build of the EAP, which we have laid out, so far makes it possible to install only ReSharper itself. Also, it removes previous versions of ReSharper and our other .NET tools; VS 2005 and 2008 are also not supported yet (but we will definitely support them a bit later).
And a few more improvements.
Here are some more new or improved features:
- VS 14 support
- The ability to partially disable the ReSharper subsystems - it has now become easier to disable support for various R # functions. Of those features that can be turned off - support for unit-testing, MsBuild / NAnt, CSS, JavaScript, TypeScript and also Internationalization.
- Debugging of decompiled code is now available in ReSharper. Of course, you can use our free dotPeek decompiler for this purpose.
- Architectural tools ReSharper'a now supports the ability to generate dependency diagrams between types . This form of visualization helps to understand which code depends on a particular type, and on which the type itself depends. This chart is integrated with other R # tools.
In this post, I described the main innovations available in the first EAP assembly - we, of course, will add new features as they become available. In the meantime, we invite everyone to
download EAP and evaluate new features for yourself.
We are interested in your opinion, so feel free to write us about your observations (here, or in our
bug tracker ). Thank! ■