OData 库 v4 与 v4.5.1 的命名空间

Namespace for OData libraries v4 vs v4.5.1

我需要将现有解决方案的 .NET 框架从 4.5.1 更改为 4.0。

解决方案中的几个项目引用了 OData。

我已经更新了参考资料(幸运的是这里使用了 NuGet)但是命名空间似乎不同,或者我在某处犯了一个明显的错误。

我尝试构建时遇到以下错误:

The type or namespace name 'Http' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)

这是一个典型的参考列表:

using System.Web.Http.OData.Builder;
using System.Web.Http.OData.Extensions;

再多的更改参考文献似乎也无济于事,所以如果您有任何建议,我将不胜感激!

好像是这个原因:

http://docs.telerik.com/data-access/developers-guide/using-web-services/asp.net-web-api/developer-guide-wcfservices-web-api-install-nuget-netframework40