当我尝试调试一个简单的信号器应用程序时出现此错误
尝试访问该方法 “Microsoft.AspNet.SignalR.DependencyResolverExtensions.InitializePerformanceCounters(Microsoft.AspNet.SignalR.IDependencyResolver, System.String,System.Threading.CancellationToken)'由方法 “Microsoft.AspNet.SignalR.RouteExtensions.MapHubs(System.Web.Routing.RouteCollection, System.String,Microsoft.AspNet.SignalR.IDependencyResolver)'失败
===已编辑[已添加更多信息] ===
确定通过在Nuget Consolse上输入
来添加SignalRInstall-Package Microsoft.AspNet.SignalR -pre
我添加了一个回购here
答案 0 :(得分:1)
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="jQuery" version="1.6.4" targetFramework="net45" />
<package id="Microsoft.AspNet.SignalR.Core" version="1.0.0-rc1" targetFramework="net45" />
<package id="Microsoft.AspNet.SignalR.Hosting.AspNet" version="1.0.0-alpha2" targetFramework="net45" />
<package id="Microsoft.AspNet.SignalR.Hosting.Common" version="1.0.0-alpha2" targetFramework="net45" />
<package id="Microsoft.AspNet.SignalR.JS" version="1.0.0-rc1" targetFramework="net45" />
<package id="Newtonsoft.Json" version="4.5.11" targetFramework="net45" />
</packages>
安装的版本在alpha和rc1之间混合。
答案 1 :(得分:0)
我通过更改.csproj文件来解决错误......
它有(可能是MVC 3左右):
<ProjectTypeGuids>{E53F8FEA-EAE0-44A6-8774-FFD645390401};
进入MVC 4项目:
<ProjectTypeGuids>{E3E379DF-F4C6-4180-9B81-6769533ABE47};