使用signalR集线器课程挑战?

时间:2014-06-05 19:54:11

标签: asp.net signalr

我有asp.net项目。我想用signalR类创建聊天室。首先,我安装了Package和nugget但是我无法在新项目Field中看到Signal hub Classes。我的安装消息来自package =>

                Install-Package Microsoft.AspNet.SignalR
                The source at nuget.org [https://www.nuget.org/api/v2/] is unreachable.     
                 Falling back to NuGet Local Cache at  
                C:\Users\sali\AppData\Local\NuGet\Cache

                 Attempting to resolve dependency 'Microsoft.AspNet.SignalR.JS (≥ 
                 Attempting to resolve dependency 'jQuery (≥ 1.6.4)'.
                 Attempting to resolve dependency 'Microsoft.AspNet.SignalR.SystemWeb                                     
                 Attempting to resolve dependency 'Microsoft.AspNet.SignalR.Core (≥ 
                 Attempting to resolve dependency 'Newtonsoft.Json (≥ 5.0.0)'.
                 Attempting to resolve dependency 'Owin (≥ 1.0)'.
                  Attempting to resolve dependency 'Microsoft.Owin (≥ 2.0.1)'.
                 Attempting to resolve dependency 'Microsoft.Owin.Security (≥ 2.0.1)'.
                 Attempting to resolve dependency 'Microsoft.Owin.Host.SystemWeb (≥ 
                  'Microsoft.AspNet.SignalR 2.0.3' already installed.
                 Prsonal already has a reference to 'Microsoft.AspNet.SignalR 2.0.3'.

什么问题?

1 个答案:

答案 0 :(得分:0)

哪个版本的VS? 2012年没有它们,Nuget包不安装模板,它们只包含二进制文件。从您的日志消息中可以清楚地看到您无法访问Nuget(第二行),但也很清楚您已经引用了SignalR。如果你想添加一个Hub类,只需添加一个简单的类并使其从Microsoft.AspNet.Signalr.Hub派生,你就不需要那个模板了。