First look to Project Rider with C# / .NET on MAC OS X

Project Rider is in beta, and available for preview. I tried to install it to see if things are going easy enough, and if it’s usable on Mac OSX El Capitan.

screenshot at mar 10 16-51-24

This is how it looks when you try to to run Project Rider:

Yes, you need to follow the link. Right link is this, and it says “Install ASP .NET 5”, which is little bit confusing - why ASP? I just need .Net. Okay, let’s continue.

After few steps DNVM (Dot Net Version Manager) is ready:

screenshot at mar 10 16-59-04

But wait, is it rc? Yes. It just means .Net is something very new. Looking for stable tools? Maybe it’s stable, but it’s RC - if you like experimenting with thigs, like I do, it’s okay. For production - well, it depends. Let’s go further and install DNX (Dot Net Execution Environment).

There are two options and I don’t understand what do I need:

  • DNX for .NET Core
  • DNX for Mono

It only says “By default DNVM will install DNX for Mono if no runtime is specified”. Ah. I’m confused. So let’s install mono, as it’s suggested in docs:

brew install mono

And then install DNX for mono:

dnvm upgrade -r mono

screenshot at mar 10 17-08-30

Finally, let’s restart Project Rider and see if it works!

screenshot at mar 10 17-10-12

Nope. We’ve got error:

Project 'KillMe' load failed
Can't initialized DNX: DNX process '65309' exit unexpectedly with code 127
/Users/Roman/.dnx/runtimes/dnx-mono.1.0.0-rc1-update1/bin/dnx: line 14: exec: mono: not found

So I was just following official docs, installed a bunch of RC software, and it doesn’t work. I’m not surprised, it’s always like that when you touch something very brand new from Microsoft. I’m Certified by Microsoft since 2005, and I write programs with C# / .NET for more than 10 years, and the outcome is exactly the same. Fresh tools just don’t work (but I still do like them). Maybe it’s something about JetBrains and Project Rider? Let’s find out.

Googling this error gives nothing. I suspect it’s something about environment variables. Brew installer gives us a hint:

export MONO_GAC_PREFIX="/usr/local"

Let’s add it. Nope, result is the same. I installed Mono via homebrew. Because it was said:

Install Mono for OS X. Alternatively you can install Mono via Homebrew.

Let’s try to install it from official website.

screenshot at mar 10 17-25-20

Nope, doesn’t work:

screenshot at mar 10 17-26-33

Maybe reboot? Nope, the same thing. Conclusion: I was not able to run IDE and environment in reasonable amount of time. It’s too fresh and too extreme for me. I leave it for you, young hackers. Leave your comment if you solved this!

I really appreciate the effort. I respect what JetBrains and Microsoft doing. But for now it looks like “Fix tools while others code”.

Very often when you see fancy presentations, somebody can say that software is ready to use, and it’s so cool, you just need to pay for it. And when you have to spend significant amount of time just to make it work… I think we should be informed at least.

UPD

I twitted the link of this post to @JetBrainsRider yesterday, and got reply from them (see first comment). Thanks, JetBrains. I tried to google it more, and wanted to spend another hour of setting this, hopefully, wonderful IDE.

I found one similar issue. It was said to edit ~/.dnx/runtimes/dnx-mono.1.0.0-rc1-update1/bin/dnx the weird way:

screenshot at mar 11 16-28-27

I tried to find a difference between these two files and here it is:

screenshot at mar 11 16-30-02

So ignore the advice, and just update line 14 in ~/.dnx/runtimes/dnx-mono.1.0.0-rc1-update1/bin/dnx from exec mono... to exec /usr/local/bin/mono....

Let’s try it now:

screenshot at mar 11 16-34-14

Now it’s better, but look at these erros, we still cannot build. We have three warnings:

  • /Users/Roman/other/KillMe/KillMe/KillMe.xproj: warning : Could not find project file /usr/local/Cellar/mono/4.2.2.30/lib/mono/xbuild/Microsoft/VisualStudio/v14.0/DNX/Microsoft.DNX.Props, to import. Ignoring.
  • /Users/Roman/other/KillMe/KillMe/KillMe.xproj: warning : Could not find project file /usr/local/Cellar/mono/4.2.2.30/lib/mono/xbuild/Microsoft/VisualStudio/v14.0/DNX/Microsoft.DNX.targets, to import. Ignoring.
  • /Users/Roman/other/KillMe/KillMe.sln: warning : Project has unknown ToolsVersion '14.0'. Using the default tools version '4.0' instead.

And one error:

  • /Users/Roman/other/KillMe/KillMe/KillMe.xproj: error : /Users/Roman/other/KillMe/KillMe/KillMe.xproj: /Users/Roman/other/KillMe/KillMe/KillMe.xproj could not import "$(VSToolsPath)\DNX\Microsoft.DNX.Props"

Maybe we can just play with these switches:

screenshot at mar 11 16-36-55

Nope. Let’s try to create another project. No luck:

screenshot at mar 11 16-41-49

Second day, it doesn’t work. There are more folks who desperately trying to make it work:

screenshot at mar 11 16-42-58

Conclusion: it is still doesn’t work, but I hope it will. I can’t name it developer’s happiness now, but I hope things will be fixed soon. I really want to give it a try. Will keep you updated on my progress in this post.

UPD2: How it works on Windows

Meanwhile, I tried to install Rider on Windows. I picked black scheme, so now you know - if screenshot is black, it’s from Windows.

Unfortunately, we cannot create blank solution and add two projects as I described here. There is no such option “Blank solution”:

01 02

Compare above to Visual Studio:

03

You can create “Empty Project” or “Console Application”. Let’s create console application (it’s selected “Empty Project” on screenshot above, don’t be confused, we need option above):

04

Solution was created. And console application project is the part of this solution. Compare to Visual Studio:

05

Wait, let’s see now what “Empty Project” means in Rider. In VS we can create “Blank Solution” and “Empty Project”:

06

Let’s create “Empty Project” in Rider. I’m trying to create and… look at this:

07

Path was not saved. It means every time I have to type it manually. VS saves relative path. C:\Projects\ is the only path for my projects. Minor Rider issue.

08

Yes, “Empty Projects” means “Solution with empty project”. Unfortunately there’s no way to create just blank solution. So you have to delete existing one from Rider UI. For some reason after deletion it’s still on the disk:

09

And you need to delete it manually. There is any references to HelloRider2\HelloRider2.csproj. It’s just abandoned. And UI looks like this:

10

Close Project menu item is confusing, because it’s closing solution, and not the project. Here is how it looks in Rider and Visual Studio:

11 12

Let’s try to write and run the easiest ever program. When I type Console. for the second time, I expect to have WriteLine highlighted by default, because it was used last time. But Rider highlights very first item. It’s sad:

13

It really affects productivity. But yes, it builds:

14

I can’t say I don’t like it. I really want to pay JetBrains for the product that can work on Mac OSX. But even on Windows it is not something I’d like to use now. I understand it’s beta, but it’s confusing, very fresh, and you have to be very enthusiastic and pain resistant if you want to use it. Let’s wait for the final version and see if these problems have been fixed.

I also want to be able to create Test Project. Hopefully I will be able to do that, because I can’t imagine how can I work without that. But yes, now it’s beta. And release is on the way. And I will keep on trying to run things on Mac. But now it seems to me that C# for Mac is something very extreme now. Frameworks are RC, IDEs are not ready. I have a feeling that I won’t be able to use it in the next year. And I wanna be wrong.

Written on March 10, 2016