0

I want to build a console app, which uses Microsoft.AspNet.SignalR.Client . However it seems, that SignalR.Client is not available on nuget for netcoreapp1.1 :

Package Microsoft.AspNet.SignalR.Client 2.2.1 is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Package Microsoft.AspNet.SignalR.Client 2.2.1 supports:
  - net40 (.NETFramework,Version=v4.0)
  - net45 (.NETFramework,Version=v4.5)
  - netcore50 (.NETCore,Version=v5.0)
  - portable-net45+sl5+win8+wp8+wpa81(.NETPortable,Version=v0.0,Profile=Profile344)
  - portable-win81+wpa81 (.NETPortable,Version=v0.0,Profile=Profile32)
One or more packages are incompatible with .NETCoreApp,Version=v1.1.

I would like to make my app as open/portable as possible (I don't distribute compiled binaries, only source to be used by other folks). How can I make below project.json changed, so I could compile and run the app (probably with netcore50) :

{
  "version": "1.0.0-*",
  "buildOptions": {
    "debugType": "portable",
    "emitEntryPoint": true
  },
  "dependencies": {
    "Newtonsoft.Json": "*",
    "Microsoft.AspNet.SignalR.Client": "*"
  },
  "frameworks": {
    "netcoreapp1.1": {
      "dependencies": {
        "Microsoft.NETCore.App": {
          "type": "platform",
          "version": "1.1.0"
        }
      },
      "imports": "dnxcore50"
    }
  }
}

Thank you in advance .

wx78
  • 21
  • 3

1 Answers1

0

You can use netcore50 in .net core app 1.1 like below. Updated project.json-

{
  "version": "1.0.0-*",
  "buildOptions": {
    "debugType": "portable",
    "emitEntryPoint": true
  },

  "dependencies": {

    "Newtonsoft.Json": "*",
    "Microsoft.AspNet.SignalR.Client": "2.2.1"
  },

  "frameworks": {
    "netcoreapp1.1": {
      "dependencies": {
        "Microsoft.NETCore.App": {
          "type": "platform",
          "version": "1.1.0"
        }
      },
      "imports": "netcore50"
      }
    }
  }
Sanket
  • 19,295
  • 10
  • 71
  • 82
  • It works, thank you ! Now I need to read somewhere, what is the differences between netcore50 and dnxcore50 and what is the impact of such change. – wx78 Jan 14 '17 at 12:25
  • @wx78 both are obsolete names. In the future Microsoft should use .NET Standard names. – Lex Li Jan 14 '17 at 12:51