简体   繁体   中英

Install the Web API Client Libraries

在此处输入图片说明 I want to install Install-Package Microsoft.AspNet.WebApi.Client. using From the Tools menu, select Library Package Manager, then select Package Manager Console. In the Package Manager Console window, type the following command.

Cannot install the Install the Web API Client Libraries. Getting this message. Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a more specific scope. Due to the override, your shell will retain its current effective execution policy of Unrestricted. Type "Get-ExecutionPolicy -List" to view your execution policy settings. For more information please see "Get-Help Set-ExecutionPolicy". Cannot type on the console.

Here are some steps you may try:

  1. Open a PowerShell window as Administrator
  2. Type the following command: Set-ExecutionPolicy Unrestricted
  3. Confirm when asked with Y
  4. Restart Visual Studio and retry the NuGet package install
  5. Enjoy the HttpClient class brought to you by the newly installed NuGet

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM