使用MapHttpRoute扩展方法时获取运行时异常
Library:Microsoft.AspNet.WebApi(5.2.4),System.Web.Http(5.2.4) 例外:
System.MissingMethodException
HResult=0x80131513
Message=Method not found: 'System.Web.Http.Routing.IHttpRoute System.Web.Http.HttpRouteCollectionExtensions.MapHttpRoute(System.Web.Http.HttpRouteCollection, System.String, System.String, System.Object, System.Object, System.Net.Http.HttpMessageHandler)'.
还存在依赖于Web.config的程序集映射
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.4.0" newVersion="5.2.4.0" />
</dependentAssembly>
我尝试重新安装Microsoft.AspNet.WebApi库但无济于事。