Rider EAP update: unit testing, .NET Core, and more

We recently (June 20) published a new private build of Project Rider, our standalone, cross platform C# IDE. We’re getting closer to starting the public preview, and so we’ve decided to start sharing details of the new features that are making it into the latest private EAP builds.

Obviously, previous EAP builds have had their fair share of new features, such as the File Structure view, Solution Wide Analysis, and the NuGet Explorer, as well as more fundamental architectural work, such as enabling inspections, the Alt+Enter menu, various refactorings and of course build and debug. We’ll take a look at some of these existing features in posts closer to the public EAP release, but for now, we’re going to start talking a bit more about what’s in the latest builds.

So, what’s new with the latest EAP?

As well as fixing a number of bugs (including some with the NuGet support), we’ve added some new things that we think you’ll like. Here are the highlights:

  • Unit test runner
  • ASP.NET Core support
  • To-do Explorer
  • Stack Trace Explorer

Unit Test Runner

The big news for this release is the addition of the unit test runner. This has been a very heavily requested feature, and we’ve worked hard to bring an initial version to Rider.

You should find the functionality very familiar if you’re already used to ReSharper. Rider has support for NUnit and xUnit by default. It does not currently support MSTest, as MSTest is too closely tied to Visual Studio.

Rider will discover tests in the editor, as you type, just like in ReSharper, and add a gutter icon to indicate test classes and test methods. You can either click this icon or use the Alt+Enter menu to run tests, which will be displayed in a test runner window very similar to the one in ReSharper.

Run tests from the alt enter menu

The tool window has multiple tabs, one for each session. The tab will show a tree view of the tests that are going to be run, with status icons to show pass, failed, skipped, etc. The output pane shows any output or failure messages, with the stack trace parsed and click-able for easy navigation. Double clicking the test in the tree will also navigate to the test method in the editor, and there is a toolbar to control running, stopping, deleting, grouping and so on.

Running tests

This is initial support, and there are still a number of features that we haven’t yet implemented, such as debugging, or more ubiquitous means of running tests. But don’t worry, we’re not done yet. We wanted to get this feature into your hands as soon as we could, so you can try it out, and let us have your feedback!

ASP.NET Core support

Rider uses ReSharper as an out of process language server, and is built from the same codebase that is the current 2016.2 EAP. This means it benefits from ReSharper’s support for ASP.NET Core projects, and can create new and open existing .NET Core projects. Furthermore, Rider includes project templates that allow you to create a new .NET Core executable or class library, so you can build your own projects from scratch.

Like Visual Studio, Rider requires existing projects to have both .sln and .xproj files; it doesn’t support opening a project.json file directly. And of course, with the recent announcements that project.json is being replaced by MSBuild .csproj files, it is now very unlikely that we will implement this support only for it be obsolete in a few months time. If you have an existing project that only has project.json, you can create a new project in a temporary folder and copy the .sln and .xproj files across and Rider will be able to open the project.

Once a project is open, Rider fully recognises the new style of referencing packages rather than assemblies, and the References node in the Solution Explorer will show packages and dependencies. Other functionality – smart editing, code completion, navigation and so on – just works.

We even get to take advantage of ReSharper’s advanced functionality, such as code completion and navigation for controller actions, and that includes from ASP.NET Core’s new tag helpers in .cshtml files (oh yes, we support .cshtml files too, with syntax highlighting, code completion, navigation, and even code completion and find usages on CSS classes).

Tag helper in code completion

To-do Explorer and Stack Trace Explorer

Another couple of new tool windows that we have added in this release are the To-do
Explorer and the Stack Trace Explorer.

The To-do Explorer works very much like you’d expect from ReSharper – scanning comments in your code that match // TODO: Fix this and pulling those out into IntelliJ’s own To-do Explorer tool window. Each item is shown as a node in the tree, grouped by file, and double clicking the item will take you to the line in the editor.

The To Do Explorer

Even better, we get to take advantage of existing IntelliJ functionality. From the Commit Changes dialog, if the Check TODO checkbox is selected, Rider will look for to-do items in the changes being committed, and allow you to review them – but only if it’s a new to-do item! The comment has to be in a block of text that has been changed.

Commit dialog checking for TODO items

The Stack Trace Explorer is simple, under the Tools menu, select Analyse Stack Trace. A new dialog opens that shows a simple text control, which shows the contents of the clipboard by default. Clicking OK on this dialog opens the Stack Trace Explorer, which parses the stack trace and makes each element clickable, so you can use it to navigate to any method or type in the stack trace.

Stack trace explorer


One thing to point out is that it’s not just updates to ReSharper that make it into Rider, but updates to the IntelliJ Platform, too. This build of Rider is based on a newer version of the IntelliJ Platform that gives new features over previous builds, such as improved log views for Git and Mercurial in the source control integration, and even font ligature support in the editor!

However, while it is nice to pull in the latest platform updates, this version of the IntelliJ Platform is still in EAP, which means some of the plugins in the default plugin repository are not yet marked as being compatible. For example, IdeaVim, which adds Vim emulation to the editor, requires an install of an EAP build, from an additional EAP plugin repository, as detailed in the readme.

As ever, please remember that this is still a private EAP build – we’re actively building the product and implementing features, and still require as much feedback as possible. Please try it out (if you haven’t already signed up, you can easily do so on the website), and let us know about any issues you encounter.

image description