【发布时间】:2016-03-03 11:19:23
【问题描述】:
.NET 4 中的 MVC4 Web API 在 Visual Studio Community Edition 中使用。
应创建接受 OData 查询字符串的 Web API 控制器。
教程在
http://odata.github.io/WebApi/#01-02-getting-started
建议使用添加 OData 支持
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.
NuGet 中可用的最大版本是 5.7.0,最小版本是 5.2.0
他们都给出了这个错误。
如何在 .NET 4 MVC4 中安装 OData 支持?
【问题讨论】:
标签: visual-studio asp.net-mvc-4 asp.net-web-api nuget odata