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支持?