由於Web API 2的新功能,我最近使用Web API 1將MVC4解決方案升級爲帶有Web Api 2的MVC5解決方案。我跟蹤了these official upgrading steps,並啓動並運行了我的解決方案。我的System.Web.Http(引用自C:\ Program Files文件(x86)\ Microsoft ASP.NET \ ASP.NET Web Stack 5 \包\ Microsoft.AspNet.WebApi.Core.5.0.0 \ LIB \ net45 \ System.Web.Http.dll)。如果我比較我的5.0.0.0 System.Web.Http dll與從互聯網下載的工作Web API 2解決方案中的DLL,類如ContinuationResult,FormattedContentResult,HttpVerbAttribute,NonActionAttribute,4覆蓋..- snip - .. Attributes,RouteAttribute缺少Web API 2.0中屬性路由的類:兩個不同的System.Web.Http 5.0.0.0 dll的?
看起來像所有新的Web API 2功能缺失,雖然我使用正確的參考。 這怎麼可能?
今天我打消了我所有的4.5.x框架和Visual Studio 2013重新安裝它。可悲的是這並沒有解決任何問題。 – Gigi2m02