Daniel Powell
Daniel Powell

Reputation: 8293

Installing posh-git in visual studio package manager

I'm trying to install posh-git to the visual studio package manager console (vs 2012) and I'm getting the following error when running .\install.ps1 in the poshgit directory and reloading the profile:

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

I can install posh-git from a normal powershell prompt with no issues it only seems to be running into this in vs 2012.

Any idea why I'm getting this error in vs only and how to fix it?

Upvotes: 5

Views: 975

Answers (1)

dahlbyk
dahlbyk

Reputation: 77540

posh-git tries to integrate with PowerTab, which provides a Register-TabExpansion function. It seems NuGet now provides its own function of the same name, but with a different signature. I just pushed a new version of posh-git with a fix.

Upvotes: 3

Related Questions