What′s New in Rider

Rider 2017.2 supports .NET Core 2.0 and MSTest, adds call and value tracking, enables opening individual folders and files, updates debugger with lambda evaluation and parallel stacks view, integrates features from the latest ReSharper and IntelliJ Platform releases.

Free 30-day trial
.NET Core 2.0

.NET Core 2.0

Rider 2017.2 adds support for .NET Core 2.0 in addition to .NET Core 1.1.

All Rider's code inspections, navigation actions, quick-fixes and refactorings are now available for .NET Core 2.0. Rider can run and debug your .NET Core 2.0 projects, manage NuGet packages that are used in them, as well as run unit tests based on xUnit, NUnit or MSTest.

Inspect This menu for call and value tracking in Rider

Call and value tracking

We've implemented some of the most insightful features that ReSharper has to offer: Call Tracking and Value Tracking.

Where does this value come from? Where is this value used? What are the call trees that this method is involved in? Using the new Inspect This action (Ctrl+Alt+Shift+A) in Rider, you can now figure this out. On member and parameter declarations, Call Tracking and Value Tracking actions are even directly available from the Alt+Enter menu.

Both features are currently available in C# and VB.NET.

Running MSTest-based unit tests from the editor

MSTest support

Rider's unit test runner already supported running and debugging xUnit and NUnit tests. With Rider 2017.2, based on popular demand, we are adding MSTest to the list of supported frameworks. This includes classic MSTest (a.k.a Visual Studio Testing Framework) as well as the emerging cross-platform MSTest V2.

MSTest V2 will work out of the box on Windows, Mac or Linux. As to classic MSTest, due to the way it's licensed, you need to have a Visual Studio instance installed on your machine in order to run classic MSTest-based tests in Rider. The path to Visual Studio needs to be configured in Rider settings under Build, Execution, Deployment | Unit Testing | MSTest.

Open folder or file with Rider

Open folder or file

Not all code is in a solution or project. With that in mind, we added a command to open an individual file or folder from the Rider start screen and the File | Open menu.

When you open a file or folder, you can use a lot of Rider features, including HTML/JavaScript/TypeScript support, version control, Go to File, Search Everywhere, as well as Find in Path.

Attach existing folder to solution

Attach folder to solution

Along with opening folders or files, Rider can now do something extra: attach any folder to a solution. This doesn't modify any project or solution files; instead, it simply makes the folder visible in Solution Explorer alongside your current solution.

This can be useful if you're working with a web application that has distinct frontend and backend parts, and they're maintained in separate repositories. In this case, attaching the frontend part to your .NET backend solution will let you edit both parts in Rider, without integrating the frontend into your solution structure.

Parallel stacks, lambda evaluation and more debugger updates

The Debug tool window gets a new tab: Parallel Stacks. When debugging multithreaded applications, it lets us visualize the various threads that are active while debugging, as well as their call stack. Hovering over a thread displays all child threads. From the toolbar, you can jump to the active frame. Double-clicking an entry in the call stack will jump to source. And when stepping through code, the diagram will be updated depending on threads that are being started/joined.

Rider's debugger now lets you add lambda expressions as watches. The debugger will evaluate and execute the expression, visualizing the results.

When debugging applications that have lots of variables, you may want to mark variables with custom colors. This can now be done using the context menu or with a shortcut. Marking a variable makes it really easy to discover where it's used, for example in fields of other objects.

Finally, we enabled adding watches for nested items, such as properties of a property of an object, or an element in a collection.

Transform Parameters refactoring

New refactorings

We keep adding more items from the broad set of refactorings originally available in ReSharper.

One of them is Transform Parameters. It lets you create a new class or struct and converts parameters of the selected method into encapsulated fields of the newly created type. After applying the refactoring, usages of parameters are converted into usages of properties of the type being created. This refactoring also allows getting rid of out parameters by introducing a tuple object return type.

Another new refactoring is Invert Boolean. It helps automatically invert a boolean member and transform true to false and rewrite all usages to invert the boolean logic.

Enabling C# 7.1 support in Rider

Code analysis updates from ReSharper 2017.2

Rider 2017.2 comes with ReSharper 2017.2 as its engine for providing .NET support. This means a number of features announced with ReSharper 2017.2 are now available in Rider.

Examples include improved support for C# 7.0 (including pattern matching and out variables), and initial support for C# 7.1. Rider now supports the default literal, tuple projection initializers, async main and pattern matching with generics. Simply reference the latest compiler package and make sure to set the language level in your project file. By the way, Rider can also detect if language features from a higher language level are used, and provide a quick-fix to make a switch.

Rider also adds some new code inspections around IEnumerable, and will check XML documentation inheritance to make sure it is valid. This ensures documentation in the IDE as well as generated API documentation is correct.

Code folding and documentation tooltips in F#

Evolving F# support

Rider 2017.2 comes with a series of new features and improvements around F#.

For example, it's now possible to work with .NET Core F# projects, for both SDK 1.0 and 2.0. For F# projects that use Paket instead of NuGet, Rider now disables its automatic NuGet restore on loading such projects. This ensures that projects like Fable load properly in Rider.

We've addressed a set of issues that you faced working with mixed C# and F# code bases, ensuring that F# code is exposed correctly in C# projects.

Rider now enables code folding in the editor. Pretty much any multi-line expression/statement can now be folded or unfolded.

We've also implemented the Comment with Block Comment action, which comments out the current selection with (* and *).

Looking up the documentation never hurts when writing code, and Rider now displays XML doc comments in a tooltip when hovering over documented code.

When you debug, Rider now supports evaluating expressions on hover, allowing us to inspect a variable from within the editor.

Bettere code highlighting in Unity shaders

Unity development

For game developers, we added support for debugging different Unity processes. You can now create a Mono Remote configuration to remotely debug standalone games, such as those running on an Android device. The IDE and debugger now also support working with modularized UnityEngine dll's.

In other notable Unity support news, we've significantly improved our ShaderLab parser, which results in better code highlighting in .cginc files and injected Cg fragments in .shader files. As an additional nice touch, Rider now highlights color values in ShaderLab files, and if you press Alt+Enter, you can modify the color using a color palette picker.

Generating Unity code is now easier, with file templates for new MonoBehaviour scripts, shaders and tests. Additionally, code completion and generation of event functions are now available in recent versions of Unity.

For mode details on Unity updates, see Rider blog.

JavaScript code arrangement settings in Rider

Better JavaScript and TypeScript support

Courtesy of a newer version of bundled WebStorm, Rider 2017.2 now offers richer support for JavaScript and TypeScript:

  • When you hover over an object while holding Ctrl, the inferred type for the object is displayed in a tooltip.
  • Reworked JavaScript code style settings allow configuring how to order members of a class, such as constructors, fields and methods. To apply these settings, use the Code | Rearrange Code command.
  • When using CSS modules and importing them into a JavaScript file, Rider provides code completion and navigation support for class names in that module.
  • Rider now detects tsconfig.json and takes it into account when analyzing TypeScript files.
  • Code completion and navigation for Angular Material attributes is now available.
  • When using webpack, Rider better understands complex configurations and properly resolves paths in import statements and import suggestions.
Reword a local Git commit

Version control improvements

When you work with Git, Rider now lets you revert and reword local commits. To do this, use the context menu under the Log tab in the Version Control tool window.

From the settings under Version Control | Commit Dialog, you can now customize commit message rules and inspections. Do you put a blank line between the subject and the body? Should the maximum length of a commit message be defined? You can set these and similar rules. In addition, Rider provides quick-fixes for these rules, and reformatting code can also be done inside the commit message.

Make code changes directly from search results

Make changes from search results

In Rider 2017.2, we improved the way you work with results of a textual search using Find in Path (Ctrl+Shift+F).

Search results from the same lines are now merged together. Also, the Preview pane now has a left-hand gutter that displays line numbers, navigation icons, context actions and local change markers. This makes it easy to make small changes directly from a search!

Unit test framework settings

More unit testing improvements

There's more than MSTest support in terms of unit testing in this release. Here's a few more highlights:

  • NUnit tests are now supported for full .NET Framework, .NET Core 2.0, and .NET Core 1.1.
  • All unit test providers now have their own settings pages where framework-specific settings can be tweaked. In addition, it's possible to disable frameworks that are not in use.
  • We've also made performance improvements for solutions that contain large test sets, as well as tests that produce a lot of output (including word wrap).
NuGet tool window in vertical layout

NuGet updates

A number of updates went into Rider's NuGet client. We're now using NuGet 4.3 under the hood, which brings full support for SemVer2 and .NET Core 2.0. Rider adds support for wildcard versions in package references, too.

When referencing packages that are not targeting .NET Core 2.0 (but are known to work with it), the AssetTargetFallback property can be used to define "fallback" target frameworks for project's dependencies. By default, .NET Core 2.0 projects will have this property set to net461, meaning that any NuGet package that is compatible with .NET Framework 4.6.1 or higher can be used without additional configuration. Rider now also includes initial support for this.

You can now install CLI tools packages right from within the NuGet client, without manually editing the .csproj file. For example, this is useful with Entity Framework Core's database migration commands from Microsoft.EntityFrameworkCore.Tools.DotNet.

We made some UI changes as well: for example, you can now toggle position of the package details pane, which is useful if you prefer to keep the NuGet tool window vertically oriented. And when possible, package icons will be rendered in high DPI making everything look more crisp.

Descriptions of base members in the Generate dialog

Even more changes

Here's a short list of other notable changes in this Rider release:

  • More and better code completion suggestions in CSS, JavaScript, TypeScript, .config, .csproj and XML files.
  • Improved Multi-line completion: for instance, import completion in C# is now available when you invoke code completion with multiple text carets set.
  • When generating code, such as overriding or missing members, Rider now shows descriptions of base members that are being overridden or implemented.
  • Import and export of all global settings is available, including both settings coming from ReSharper and the IntelliJ platform.
  • Solution-wide analysis (SWEA) is automatically paused during NuGet restore when running it doesn't make a lot of sense.
Free 30-day trial