4
votes

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;

  • Microsoft.ASpNet.SignalR
  • Microsoft.ASpNet.SignalR.Client
  • Microsoft.ASpNet.SignalR.Core
  • Microsoft.ASpNet.SignalR.JS
  • Microsoft.ASpNet.SignalR.OWin
  • Microsoft.ASpNet.SignalR.SystemWeb
  • Microsoft.Owin
  • Microsoft.Owin.Host.SystemWeb
  • Microsoft.Owin.Security

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 ?

2
What version of SignalR are you trying to install and what version of .NET are you using? Please, see this page to see How to create a Minimal, Complete, and Verifiable exampleradu-matei
I installed the last version 2.2.0Erdogan
whats your visual studio version ?Mohammad Olfatmiri
@Oli I use VS 2015Erdogan

2 Answers

3
votes

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.

1
votes

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.