3
votes

I am getting this error

Owin.IAppBuilder' does not contain a definition for 'MapSignalR' and no extension method 'MapSignalR' accepting a first argument of type 'Owin.IAppBuilder' could be found (are you missing a using directive or an assembly reference?)

This is my code

 using System;
 using System.Threading.Tasks;
 using Microsoft.Owin;
 using Owin;

 [assembly: OwinStartup(typeof(VirtualClassroom.Startup1))]

 namespace VirtualClassroom
 {
     public class Startup1
        {
           public void Configuration(IAppBuilder app)
               {
                    app.MapSignalR();

               }
        } 

} I searched a lot and tried as per stack overflow answer 'Owin.IAppBuilder' does not contain a definition for 'MapSignalR' I had

1.Added Microsoft.Owin //version 2.0.1

2.Added Microsoft.Owin.Security //version 2.0.1

3.Added Microsoft Asp.Net SignalR

But still I am getting the same error. Please help. Thanks in advance!!

1
which version of Microsoft.AspNet.SignalR.Core.dll do you have?christiandev
I am having SignalR 2.0.1 .I was having the latest version but according to this link stackoverflow.com/questions/26801385/… I uninstalled the latest version and installed signalR 2.0.1 @christiandevAnusha

1 Answers

11
votes

It looks like you have an old version of Microsoft.AspNet.SignalR.Core.dll, go to nuGet and install this package and you should see this extension method... enter image description here

You should then see a bunch of these methods public static IAppBuilder MapSignalR(this IAppBuilder builder); under OwinExtensions.

EDIT: Based on comment

Go to references, and click on properties of this reference...

enter image description here

The version should be similar to below...

enter image description here