gpt4 book ai didi

powershell - Nuget(PowerShell 2.0 错误)Visual Studio 2015、Windows 10 (PwrShl 5.0)

转载 作者:行者123 更新时间:2023-12-02 23:33:07 24 4
gpt4 key购买 nike

我在 Windows 10 上使用 Visual Studio 2015 - 我在运行 Nuget Console 时遇到问题,它需要 Powershell 2.0。我实际上安装了 powershell,但它的版本 5.0

我真的不明白为什么5不能与2兼容?或者为什么 nuget 在未安装 2 的情况下找不到 5?

  • 我尝试过安装 2,但没有成功

  • 我尝试了 nuget 包签名的常规更改权限,但也不起作用

有人有建议吗?我确信这一定是可能的!

我需要下载最新的 Google 自定义搜索 API,似乎 Nuget 是唯一的方法,但如果没有,那么现在直接下载 API 的链接同样有用! (我几乎从 google API 获得了所有内容,除了搜索哈哈)

我还尝试通过 PowerShell 5.0 手动安装(Google Search API)软件包,但找不到它们,据我所知,存储库应该已经添加,但也许没有?

完整错误消息:

Error: The Package Manager Console requires PowerShell 2.0 runtime, which is not detected on this machine. Please install the PowerShell 2.0 from support.microsoft.com/kb/968929 and restart Visual Studio

最佳答案

您需要安装Powershell 2.0。在 Windows 10 上,您可以按照以下步骤操作:

  1. 转到此电脑
  2. 点击“计算机”选项卡上的卸载或更改程序
  3. 点击打开或关闭 Windows 功能
  4. 标记 Poweshell 2.0 进行安装
  5. 点击确定

或者以管理员身份打开 powershell 并:

  1. PS> 安装WindowsFeature PowerShell-V2

关于powershell - Nuget(PowerShell 2.0 错误)Visual Studio 2015、Windows 10 (PwrShl 5.0),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32005323/

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