12
votes

I can't seem to get SignalR 3 working on ASP .Net 5 RC-1 upgrading from Beta8. I tried the latest RC1 package for SignalR but had the following problem. I tried the "Microsoft.AspNet.SignalR.Server": "3.0.0-rc1-15810" package

services.AddSignalR();

is causing the following error:

The type 'IServiceCollection' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

and app.UseSignalR();

is causing this one:

The type 'IApplicationBuilder' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.AspNet.Http.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

When I switch to the "Microsoft.AspNet.SignalR.Server": "3.0.0-rc2-15909" package I get a runtime error:

An exception of type 'System.TypeLoadException' occurred in mscorlib.dll but was not handled in user code

Additional information: Could not load type 'Microsoft.AspNet.Http.RequestDelegate' from assembly 'Microsoft.AspNet.Http.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.

3
SignalR is not supported for Asp.Net 5 v1.Tratcher
@Tratcher what about this. Also it looks like this is using it.Stafford Williams
@Tratcher it definitely is supported. The answers below worked for me, and I have been using it with beta 8 for the past few weeks.Tjaart
It's there, but it's not supported for v1: github.com/aspnet/Home/wiki/Roadmap#future-workTratcher

3 Answers

33
votes

I've just tested this, and it looks like a reference to the aspnetmaster myget feed is required, even though this is not mentioned in the installation docs.

Prior to including aspnetmaster I could only resolve Microsoft.AspNet.SignalR.Server 3.0.0-rc1-15810 either directly or by specifying rc1-*, which does not build against rc1-final. Including aspnetmaster gives access to rc1-final.

If you're using Visual Studio 2015, go to Tools > Options > Nuget Package Manager > Package Sources and add a new feed called whatever you like but with source set to https://www.myget.org/F/aspnetmaster/api/v3/index.json.

If you're not using VS2015, or you don't want to edit your machine-wide config, add/edit NuGet.config in your solution root directory to include a package source as follows;

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="aspnetmaster" value="https://www.myget.org/F/aspnetmaster/api/v3/index.json" />
  </packageSources>
</configuration>
5
votes

Use MyGet sources for "Microsoft.AspNet.SignalR.Server": "3.0.0-rc1-final"

Here related answer, that can be helpful: Can't find Microsoft.AspNet.SignalR.Server 3.0.0-beta7

0
votes

For anyone who is looking at this page now, the aspnetmaster feed has removed "Microsoft.AspNet.SignalR.Server": "3.0.0-rc1-final"