Hangfire in ASP.NET Core RC2

While upgrading our solution to RC2 (a Must have for our next release) we run against the following errors.
It was working without issues in RC1

error: Package Hangfire.Dashboard.Authorization 2.1.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Hangfire.Dashboard.Authorization 2.1.0 supports: net45 (.NETFramework,Version=v4.5)

error: Package Hangfire.Core 1.6.0-beta2 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Hangfire.Core 1.6.0-beta2 supports: net45 (.NETFramework,Version=v4.5)

error: Package Hangfire.SqlServer 1.6.0-beta2 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Hangfire.SqlServer 1.6.0-beta2 supports: net45 (.NETFramework,Version=v4.5)

Any idea or workaround ?

For now it seems the workaround I just figured out is not to use netcoreapp1.0 as a framework, but instead use dnx451 or dnx46. I’ll take a deeper dive if this does not work. I forked the project on github and looked at the dnx branch, but that branch doesn’t compile anymore on RC2 and is over 1 year old?

  "dependencies": {
    //"Microsoft.NETCore.App": {
    //  "version": "1.0.0-rc2-3002702",
    //  "type": "platform"
    "Microsoft.AspNetCore.Authentication.Cookies": "1.0.0-rc2-final",
    "Microsoft.AspNetCore.Authentication.OpenIdConnect": "1.0.0-rc2-final",
    "Microsoft.AspNetCore.Diagnostics": "1.0.0-rc2-final",
    "Microsoft.AspNetCore.Mvc": "1.0.0-rc2-final",
    "Microsoft.AspNetCore.Razor.Tools": {
      "version": "1.0.0-preview1-final",
      "type": "build"
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final",
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final",
    "Microsoft.AspNetCore.StaticFiles": "1.0.0-rc2-final",
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final",
    "Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final",
    "Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc2-final",
    "Microsoft.Extensions.Logging": "1.0.0-rc2-final",
    "Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final",
    "Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-final",
    "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-rc2-final",

    "Microsoft.EntityFrameworkCore": "1.0.0-rc2-final",
    "Microsoft.EntityFrameworkCore.SqlServer": "1.0.0-rc2-final",
    "Swashbuckle": "6.0.0-rc1-final",
    "Swashbuckle.SwaggerGen": "6.0.0-rc1-final",
    "Swashbuckle.SwaggerUi": "6.0.0-rc1-final",
    "Microsoft.AspNetCore.Owin": "1.0.0-rc2-final",
    "HangFire": "1.6.0-beta2",
    "Hangfire.Dashboard.Authorization": "2.1.0"

  "frameworks": {
    "dnx46": {
      "dependencies": {
    //"netcoreapp1.0": {
    //  "imports": [
    //    "dnxcore50",
    //    "portable-net45+win8"
    //  ]

I too had to drop dnxcore50 on it and use dnx46, seems to be working alright.

I also needed to use something such as suggested here: https://www.illucit.com/blog/2016/04/hangfire-and-asp-net-5/#more-352 for controlling authorization (I’m using roles though).

If you happen to figure out how to leverage IoC for an Activator that depends on a DbContext, I’ld love to see it… I cannot get that working yet.

Is anyone working on getting this to work with .NET Core RC2 targeting the cross-platform libraries?