gpt4 book ai didi

.net - HttpClient - .net 4 或 .net 4.5

转载 作者:行者123 更新时间:2023-12-02 02:05:35 25 4
gpt4 key购买 nike

我在 Nuget HttpClient page那里的信息似乎是矛盾的。第一段是:

This package provides a programming interface for modern HTTP applications on .NET Framework 4, Silverlight 4 and 5, Windows Phone 7.5 and 8. This package includes HttpClient for sending requests over HTTP, as well as HttpRequestMessage and HttpResponseMessage for processing HTTP messages.

但是,第三段说,

This package is not supported in Visual Studio 2010, and is only required for projects targeting .NET Framework 4.5 or .NET for Windows Store apps when consuming a library that uses this package. For known issues, please see: http://go.microsoft.com/fwlink/?LinkID=279987.

所以,它是针对“[.Net 4] 上的现代应用程序,但目标是 [.Net 4.5]?

什么给了?

最佳答案

它适用于以 .NET 4 为目标的应用程序,因为 .NET 4.5 has these features built-in , 因此针对 4.5 的应用程序可以只使用 .NET 附带的版本。

如果以 .NET 4.5 为目标,则只有在使用使用此包的库时才需要该包(很明显:如果您的依赖项之一依赖于 HttpClient,那么您也依赖于 HttpClient)。

关于.net - HttpClient - .net 4 或 .net 4.5,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15222892/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com