Project Rider – A New Challenger Appears

Jamie Taylor2 comments
Project Rider Header ImageSource: https://stocksnap.io/photo/TPC4QY9XQ8 Copyright 2017: Binyamin Mellish

Today’s header image was created by Binyamin Mellish, the original source for the image is available here

Project Rider

Back in January 2016, JetBrains announced that they were working on a cross platform IDE for C# projects. If the name JetBrains is familiar to you, that’ll be because they are the developers behind the amazing Visual Studio add-on ReSharper and the fantastic IDE IntelliJ.

It seemed a little strange to me that JetBrains, who seem to make a lot of their money from their ReSharper add-on, would want to try to undercut Microsoft by creating their own IDE. But if they were going to support .NET Core and include the features of ReSharper, then I’d decided I would have to give it a go.

JetBrains describe Rider in this way:

Rider is a full-fledged, cross-platform .NET IDE. Rider can open, manage, build and debug a wide variety of .NET Framework, Mono and .NET Core based solutions, and provides editing support for most languages used in .NET development: C#, VB.NET, ASP.NET syntax, XAML, XML, JavaScript, TypeScript, JSON, HTML, CSS, and SQL.

Which is a pretty impressive set of features.

Oh and it has ReSharper built in.

Even better

Early Access

The first thing that I should say, is that Rider is currently

at the time of writing

free, due to it being in early access. This is because it’s currently in a public beta. To be fair, I’ve not seen anything (while using it) to make me think that it’s a beta product – but I think that shows the background that JetBrains have in creating IDEs.

In the process of writing this post, I demo’d Rider on

  • MacOS Sierra
  • Windows 10
  • Ubuntu 16.04

And on each of these platforms…

First Run

During it’s first run, Rider will present you with a set up wizard. This wizard guides you though picking a UI theme:

Project Rider - Setup Theme
I prefer a dark theme whenever one is available.

Text colour schemes:

Project Rider - Setup Colour Scheme

And key mappings:

Project Rider - Setup Keymapping

Along with pages for plugins too

I decided against showing every step of this process, because I didn’t want this post to become a selection of screen shots with only a few paragraphs between them

After you’ve set up Rider you’ll be shown the, frankly, beautiful splash screen:

Project Rider - Splash Screen
It makes sense that they would time limit the early access beta

Finally, you’ll get through to the IDE proper

Caveats

If you’re running on a non-Windows OS (MacOS or one of the supported Linux distributions), you’ll need to install Mono and the .NET Core SDK in order to compile any .NET Core projects.

I found this out when I opened the JavascriptServices source code (specifically the code for the NodeServices namespace) with Rider on my Ubuntu 16.04 box. That particular machine didn’t have Mono installed on it, and this was the error that I received.

Project Rider No Mono Present
I don’t have Mono installed on this machine, so I received an error on opening the project

I’ve included the version of Rider here, to show that I’m running the latest (at the time of writing) version

Simply installing Mono was enough for me to get around this issue, but it might be something worth noting if you’re planning on doing a lot of cross platform work.

I didn’t have the issue on my Mac because I’d already installed Visual Studio for Mac – which installs Mono for you

In order to install Mono, you can follow the instructions at the Mono website, here. I also had to install MSBuild, as I received this error message:

Project Rider No MSBuild Present
I received this error because I didn’t have MSBuild installed, too

All in all, the shell commands I had to issue were:

Remember, these are Ubuntu specific and require apt – YMMV

# add the GPG signed key to your apt repository
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
# enable installation of mod-mono on Ubuntu 13+ and Debian 8+
echo "deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list
# install the mono compiler and bare bones
sudo apt-get update
sudo apt-get install mono-devel
# install everything which isn't covered in the previous package
sudo apt-get install mono-complete
# install msbuild
sudo apt-get install msbuild

Only once I’d installed all of those packages was I able to open or create a .NET Core project.

Project Rider Mono And MSBuild Present
The equivalent of dotnet restore is happening in the lower right corner of the screen shot

IDE

As IDEs go, Rider is really nice. As with any other IDE, building is available at the click of a button and it’s pretty speedy too – as you’d expect, Rider calls the CLI tools to build your project.

Project Rider Project Running

Building Caveats

As of writing this blog post, Rider cannot debug .NET Core applications on non-Windows platforms. This is due to a licensing restriction placed on the Microsoft.VisualStudio.clrdbg NuGet package, as explained in this Rider blog post.

This means that if you need to debug a .NET Core application, and you’re on a non-Windows platform, you’ll need to rely on either Visual Studio for Mac (for MacOS only) or Visual Studio Code for the time being.

According to the above blog post, JetBrains are currently looking into their options regarding debugging on non-Windows platforms.

Package Management

Rider, as with Visual Studio, has a window for managing package for your application. The key difference being that Rider’s window is dockable, whereas Visual Studio uses a full screen tabbed window.

Which I guess is dockable too, but Rider’s one is docked by default

Project Rider Package Manager
The package manager window is docked at the bottom left of the screen

Searching for packages is pretty easy, however I’d suggest going full screen before doing it. And here is why:

Project Rider Package Search Non-Fullscreen

In the above screen shot, I’ve searched for “entityframeworkcore” but because of the way the dockables are set up on first run, the search box contents are hidden.

Whenever I’m not using Windows, I like to leave applications un-maximised, so I was bitten by this when I started using Rider

However, when you maximise Rider, you’ll be able to see the contents of the search box correctly:

Project Rider Package Search Fullscreen

This can be avoided by hiding the Event Log, but I like to have that visible so that I can see any errors as and when they happen.

Adding a package is a case of choosing one from the search results, scrolling to the end of its description

don’t forget to read it, too

and clicking the Add button:

Project Rider Package Add

You’ll be prompted to ensure that you want to add the package:

Project Rider Package Add Confirm

When you confirm, Rider will add and restore the package for you:

Project Rider Package Add Complete

Removing a package is a case of finding it in the list of installed packages, scrolling to the bottom of its description and clicking the Remove button:

Project Rider Package Remove

You’ll be prompted for confirmation, and the package will be removed from the project.

Source Control – Loading Projects

Source control is one of the most important things in software development, and adding a project from Source Control in Rider is quite easy. It also supports some providers that Visual Studio doesn’t (by default).

On the welcome screen there’s an option for opening from Source Control:

Project Rider Source Control

Once you’ve authorised with a service

I use GitHub almost exclusively for my personal work

you’ll see a list of your repos, along with those that you follow or have starred

at least, when using GitHub you will

Project Rider Source Control Add From GitHub

Cloning the project will do exactly that, and Rider will open the project after it has finished cloning it.

Source Control – Committing Changes

File changes are shown in the Version Control tab, which can be accessed at any time:

Project Rider Source Control Tab
I made a change to the source of dwCheckUi specifically to demonstrate this

The Commit Changes modal is fully featured and allows for all sorts of git features:

Project Rider Source Control Commit Modal

and when the commit has completed successfully, you’ll be informed in the Version Control tab:Project Rider Source Control Push Success

And, just as a way of proof, here is the change set that I committed.

Publishing

At the time of writing this blog post, Rider doesn’t have support for publishing .NET applications (regardless of whether they are full .NET or .NET Core), and there doesn’t seem to be anything on the blog for Project Rider which indicates when it will be happening.

At the time of writing this blog post, anyway

For now, it looks like your options or publishing .NET Core applications are still:

  • Visual Studio (on Windows)
  • Visual Studio for Mac (on MacOS)
  • CLI options and FTP upload to Azure (cross platform)

Conclusion

Project Rider is an extremely promising IDE from a company who really know how to make IDEs. The Linux and MacOS builds are lacking, at the moment, in that you can’t debug with them – however this is not a limitation that the Windows build has (due to a licensing issue).

Without the ability to publish directly to Azure (coupled with the lack of support for debugging on non-Windows platforms), I wont be switching to Rider permanently. But I’m still going to keep an eye on the project and see how it grows, as it could prove an interesting cross platform competitor to Visual Studio.

Have you tried Rider yet? If so, what did you think of it? If you haven’t tried it yet, what has kept you from trying it out?

If this post has helped you out, please consider   Buy me a coffeeBuying me a coffee
Jamie Taylor
A .NET developer specialising in ASP.NET MVC websites and services, with a background in WinForms and Games Development. When not programming using .NET, he is either learning about .NET Core (and usually building something cross platform with it), speaking Japanese to anyone who'll listen, learning about languages, writing for his non-dev blog, or writing for a blog about video games (which he runs with his brother)