我在这里跟随教程:
http://www.asp.net/web-api/overview/releases/whats-new-in-aspnet-web-api-21#download
我在Visual Studio 2012(.NET Framework 4.5)中创建了一个MVC Web Api项目,并在我的NuGet软件包管理器控制台Install-Package中运行此命令Microsoft.AspNet.WebApi
当我试图构建我的项目,我得到这个错误:
'CommonServices.Areas.HelpPage.XmlDocumentationProvider' does not implement interface member 'System.Web.Http.Description.IDocumentationProvider.GetDocumentation(System.Web.Http.Controllers.HttpControllerDescriptor)' c:\users\administrator\documents\visual studio 2012\Projects\CommonServices\CommonServices\Areas\HelpPage\XmlDocumentationProvider.cs 'CommonServices.Areas.HelpPage.XmlDocumentationProvider' does not implement interface member 'System.Web.Http.Description.IDocumentationProvider.GetResponseDocumentation(System.Web.Http.Controllers.HttpActionDescriptor)' c:\users\administrator\documents\visual studio 2012\Projects\CommonServices\CommonServices\Areas\HelpPage\XmlDocumentationProvider.cs
有没有我错过的东西?
解决方法
当得到Microsoft.AspNet.WebApi时,我遇到了同样的问题.
在Nuget软件包管理器控制台写下:
Update-Package -ProjectName 'YourProjectNameGoesHere' -Reinstall
这将更新您的所有包,它将解决您的问题.我希望它有帮助