Erdogan
Erdogan

Reputation: 1000

"SignalR" Doesn't recognize hub

I added all SignalR component but I still have got some errors about dll recognition.

The type or namespace name 'Hub' could not be found (are you missing a using directive or an assembly reference?)

I added following libraries on NuGet;

I think, I don't need most of them.

namespace GenelProject
{
    [HubName("gsChat")]
    public class ChatHub : Hub

Why Visual Studio doesn't recognize SignalR hub when I want to use it ?

Upvotes: 4

Views: 3819

Answers (2)

Mohammad Olfatmiri
Mohammad Olfatmiri

Reputation: 1675

please right click on your project and select manage Nuget Packages then in Installed tab find Microsoft.ASPnet.signalR press uninstall. then try installing it again.

Upvotes: 1

Saravana
Saravana

Reputation: 40702

You only need the Microsoft.AspNet.SignalR.Core package. And make sure you have the namespace Microsoft.AspNet.SignalR imported with a using statement in your file.

Upvotes: 3

Related Questions