使用NuGet的SignalR问题

时间:2012-06-23 23:48:04

标签: asp.net signalr

我在设置SignalR的简单测试项目时遇到了问题。

我使用VS WD Express 2010NuGet中安装了 SignalR ,但是当我尝试运行我的网站时,我收到以下Asp.Net错误页面。 (看起来NuGet正确添加了所有程序集)

之前有人见过这个吗?

Could not load type 'SignalR.PersistentConnection' from assembly 'SignalR

[TypeLoadException: Could not load type 'SignalR.PersistentConnection' from assembly 'SignalR, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.]
   SignalR.Hosting.AspNet.AspNetBootstrapper.Initialize() +0

[InvalidOperationException: The pre-application start initialization method Initialize on type SignalR.Hosting.AspNet.AspNetBootstrapper threw an exception with the following error message: Could not load type 'SignalR.PersistentConnection' from assembly 'SignalR, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'..]
   System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +423
   System.Web.Compilation.BuildManager.CallPreStartInitMethods() +306
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +677

[HttpException (0x80004005): The pre-application start initialization method Initialize on type SignalR.Hosting.AspNet.AspNetBootstrapper threw an exception with the following error message: Could not load type 'SignalR.PersistentConnection' from assembly 'SignalR, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'..]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9090876
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +258

1 个答案:

答案 0 :(得分:28)

您的项目名称是SignalR,请更改它。