Dazed and confused: The state of the Core

time to read 5 min | 886 words

It feels like I took my eyes off the ball for a second, and suddenly I'm in an entirely new game.

We have been working with CoreCLR (the RC1 release from last year), and have been grateful to be able to run our software oh so easily on both Windows and Linux (heaven and earth difference from trying to run on Mono).

However, stuff changed. I know about the delay in shipping CoreCLR (and I'm whole heartedly approve it, we need something stable), and I have some rough idea about where the general direction is. But what is the current state? No idea.

Googling this find me fragments of information, and not at all useful.

The decision to go with NET Standard instead of the bazillion individual packages is something that I applaud. It should make our life easier. Except that when I tried that I run into a whole bunch of issues that caused me to stop trying for a time.

Basically, here is what I need to know is whatever there currently a way to get a CoreCLR (dotnet cli, whatever the current term is) on the latest framework / libraries that would actually make sense.

In this context, make sense means that I get to do things like use Visual Studio normally (more or less) to build / debug my application. I'm fine with quite a lot of manual / scripts work, but I really like being able to debug. The nice thing about the RC1 bits is that it mostly works, you can debug it, profilers work, the whole thing. It is different than running on the standard framework, because some things don't work, but that is something that we can work with. (In particular, no easy way to get pdbs for stuff like profiling is really annoying).

When I read Hanselman's post about the dotnet cli, I was quite excited. It made sense. But now I feel that instead of having all the usual power that I'm used to have plus all the conveyance of just opening a shell and start pounding code, it is the other way around. It is somewhat like being back working in perl. If stuff works, great, but if it isn't, you might as well just start from scratch.

I'm talking about the build system, the dependencies, "how do I run this?", "how do I debug this?" questions.

What makes this worse is that there doesn't appear to be a roadmap that we can peek at (not that I could find). I can see some discussions in chats and in issues, but there is no real "this is where we are going" sense.

To explain some of my frustration, let me take my simplest project, which current contains the following details:

  "frameworks": {
    "dnxcore50": {
      "dependencies": {
        "Microsoft.CSharp": "4.0.1-beta-23516",
        "System.Collections.Concurrent": "4.0.11-beta-23516",
        "System.Diagnostics.Debug": "4.0.11-beta-23516",
        "System.Diagnostics.Contracts": "4.0.1-beta-23516",
        "System.Runtime.InteropServices.RuntimeInformation": "4.0.0-beta-23516",
        "Microsoft.AspNet.Hosting": "1.0.0-rc1-final",
        "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
        "Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc1-final",
        "Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final",
        "Microsoft.AspNet.WebSockets.Server": "1.0.0-rc1-final",
        "NLog": "4.4.0-*"
      }
    }
  },
  "dependencies": {
  }

Now, I want to move this core from DNX RC1 to the latest release. So this probably will look like this:

"frameworks": {
  "dnxcore50": {
    "dependencies": {
      "Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc1-final",
      "Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final",
      "Microsoft.AspNet.WebSockets.Server": "1.0.0-rc1-final",
      "NLog": "4.4.0-*"
    }
  }
},
"dependencies": {
  "NETStandard.Library": "1.0.0-rc3-23909"
},

I think, at least, that this is what it is supposed to be. Everything that I expect to be in the standard library to be in the standard library, and the rest I still need to reference. Now we get to the fun part. Using "dotnet restore / dotnet build" it successfully compiles. But using "dnu restore / dnu build" it does not.

I think that this relates to the magic incantation of the specific nuget feeds that it checks, but I'm not sure. Not being able to also compile that on DNX means that I can't use Visual Studio to actually work on this project.

And a more complex project just doesn't work.

So I'm lost, and feeling quite stupid at this point. And more than a bit frustrated.