How-To's

Rider Release Candidate: performance, refactorings, Unity and more!

Good news, everyone! GREAT news everyone! The Rider Release Candidate (RC) build is now available for download! 

Download Rider 2017.1 RC

With this Release Candidate, we’re taking a big step towards Rider’s first release, we’re almost there. The RC is a release configuration build, which means you shouldn’t be seeing any exception collection/reporting activity in the status bar (although exceptions, if any, will still be logged for support purposes.)

In terms of functionality, we’ve improved performance, refactorings and Unity support, enabled more WebStorm features, worked on the debugger, added VB.NET typing assists, implemented NuGet private feed authentication and fixed several bugs. Let’s have a look!

Performance improvements

A lot of work for this release candidate build went into performance improvements across the board. Most notably:

  • Improved startup performance on Windows. Regardless of the solution size, Rider should start roughly 5-10 seconds faster.
  • F# editor performance improvements. Due to some race conditions between parsing and analyzing code, there were some short (but noticeable) freezes which should now be gone.
  • We optimized NuGet restore in several ways:
    • For .NET Core, we used to run restore on every solution load, even when there were no changes. We now run NuGet restore only when needed.
    • Rider now tries the local cache first when restoring packages, similar to what dotnet restore  does.
    • When changing the project toolset, Rider now runs a NuGet restore to make sure the correct dependencies are downloaded and referenced.
  • We removed unnecessary calls to our code formatter, making editing and refactoring snappier.
  • Solution-wide analysis no longer runs when opening files that are not part of a project (e.g. when making a quick change in a .config file)

All of these changes make for a smoother experience developing applications with Rider!

NuGet private feed authentication support

Many teams make use of their own in-house or externally hosted NuGet repository, typically containing packages that can only be used inside the development teams. While Rider already supported adding private feeds, it lacked the ability to specify credentials to connect to such feed. Until now – we’ve added initial support for feed authentication!

From the NuGet tool window under the Sources tab, we can edit or add a feed and provide a username and password to connect to it.

NuGet Private Feed and Authentication support

Credentials are stored in Rider’s password store which is based on KeePass. It’s perfectly possible to use an existing KeePass database, or open the Rider password store with the KeePass password manager.

Debugger supports generics, extension methods

We made some more debugger improvements. Before, it was impossible to evaluate expressions that would use generic or extension methods. With this Release Candidate build, we added the ability to evaluate expressions like list.FirstOrDefault() in debugger watches or when evaluating expressions:

Debugger - evaluate expression

Note that this currently only works for .NET and .NET Core, we’re working on Mono support as well.

Visual Basic typing assistance

While on this blog we often talk about C#, Rider has VB.NET support as well. We have added some typing assistance when writing a Sub/Function/Class/While/… – when pressing Enter, Rider automatically adds a corresponding End … statement.

vbnet-enter-preview

We also added automatic templates for properties and custom events that are triggered on Enter:

VB.NET - Complete EventHandler with template on enter

Unity and ShaderLab

In the Unity department, we have added ShaderLab syntax highlighting and error analysis. Initial code completion support, TODO comments, commenting/uncommenting keyboard shortcuts and code folding support were added, too.

Unity - ShaderLab support

Refactoring

A new refactoring was introduced to Rider: Extract Members to Partial. Imagine having a class with a few members and all equality members etc. When developing business logic, we may want to “hide” away these methods into regions Trollface, or into a partial class.

Using Refactor This… (Ctrl+Alt+R in the Visual Studio keymap), we can select the members we want to move into a partial class, and have Rider create a new file for it.

Refactor - Extract members to partial

For Move to Folder (and the newly introduced Extract Members to Partial), we improved path completion support in the refactoring dialog, supporting both forward and backward slashes in paths.

Forward and backward slashes supported in refactorings

Rename support for languages with mixed ReSharper/IntelliJ IDEA features was improved. For example for JavaScript and TypeScript, Rider now merges Rename functionality from both IDE’s – using ReSharper’s rename when available, IntelliJ IDEA’s rename otherwise.

Web development features from WebStorm

Rider is the best of ReSharper and the best of IntelliJ IDEA and WebStorm, combined. Apart from some inconsistencies in settings and code completion that have mostly been ironed out over the course of EAP, we have done a great job in combining features from the two.

A good example would be editing Web.config files. Rider provides navigation to both referenced XSDs (thanks, IntelliJ IDEA!) and .NET types (thanks, ReSharper and dotPeek!).

However it’s not always possible to combine both worlds easily. For JavaScript, TypeScript, CSS and HTML, combining features is a daunting task, since both ReSharper and WebStorm have a lot of similar features. We took another look at our web stack and found that for these languages, sticking to only WebStorm features provides the best functionality for web development with Rider.

More improvements

In .config and MSBuild files, we improved navigation support. Using Ctrl+Click, we can now possible to navigate to the XSD schema, an external URL, or a type – whether in the current solution or in the decompiler.

Navigation in config files and MSBuild

Have a complex file? Not interested in running and displaying all inspections for that file? Rider now provides per-file access to the underlying engine and lets us configure the highlighting level:

Select level of syntax highlighting/code analysis per file

Last but not least: when running an application from Rider, we’d typically show all console output in a tool window in the IDE. When editing the Run/Debug configuration, it is now possible to always run using an external console.

Run/Debug Configuration - Use external console

Download Rider Release Candidate (RC) and give it a try! We would love to hear your feedback through the comments below!

image description