Owin.IAppBuilder does not contain a definition for ‘MapSignalR’ error in asp.net

asp.netowinsignalr

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!!

Best Answer

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