【问题标题】:Installing posh-git in visual studio package manager在 Visual Studio 包管理器中安装 posh-git
【发布时间】:2012-11-04 03:21:06
【问题描述】:

我正在尝试将 posh-git 安装到 Visual Studio 包管理器控制台(与 2012 年相比),在 poshgit 目录中运行 .\install.ps1 并重新加载配置文件时出现以下错误:

Register-TabExpansion : A parameter cannot be found that matches parameter name 'Type'.
At D:\posh-git\GitTabExpansion.ps1:218 char:37
+     Register-TabExpansion "git.exe" -Type Command {
+                                     ~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Register-TabExpansion], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Register-TabExpansion

我可以从正常的 powershell 提示符安装 posh-git,没有任何问题,它似乎只在 vs 2012 中遇到。

知道为什么我在 vs only 中遇到此错误以及如何解决它吗?

【问题讨论】:

    标签: powershell visual-studio-2012 posh-git


    【解决方案1】:

    posh-git 尝试与提供Register-TabExpansion 功能的PowerTab 集成。 NuGet 现在似乎提供了自己的同名函数,但签名不同。我刚刚推送了一个新版本的 posh-git 并进行了修复。

    【讨论】:

      猜你喜欢
      • 2016-11-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-09
      • 2017-08-06
      • 2023-02-23
      • 2015-04-12
      相关资源
      最近更新 更多