在 Visual Studio 包管理器中安装 posh-git

5

我正在尝试在Visual Studio包管理器控制台(vs 2012)中安装posh-git,并且当在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中会出现这个错误,以及如何解决它吗?

1个回答

3

posh-git试图与PowerTab集成,后者提供了一个Register-TabExpansion函数。现在NuGet提供了自己的同名函数,但签名不同。我刚刚发布了一个修复版本的posh-git。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接