1
.NET 4中的MVC4 Web API用於Visual Studio Community Edition。如何在ASP.NET MVC4中安裝OData支持
應該創建接受OData查詢字符串的Web API控制器。
教程中
http://odata.github.io/WebApi/#01-02-getting-started
建議的OData supoort使用添加
Install-Package Microsoft.AspNet.Odata
我試着使用的NuGet來安裝它,但遇到錯誤
Could not install package 'Microsoft.AspNet.WebApi.Client 5.2.3'.
You are trying to install this package into a project that targets
'.NETFramework,Version=v4.0', but the package does not contain any
assembly references or content files that are compatible with that
framework. For more information, contact the package author.
最大版本sion在NuGet中可用的是5.7.0和最小的5.2.0
兩者都會出現此錯誤。
如何在.NET 4 MVC4中安裝OData支持?