2010-08-17 7 views
2

J'ai installé TFS Power Tools 2008 avec ses fonctions d'intégration PowerShell sur mon ordinateur de développement Windows 2008 R2.TFS Power Tools 2008 Powershell Snapin ne s'exécute pas sur 64 bits sous Windows 2008 R2

Lorsque je tente d'exécuter la commande suivante pour activer la snapin:

Add-PSSnapin Microsoft.TeamFoundation.PowerShell 

dans la version 32 bits de PowerShell.exe, sous C: \ Windows \ SysWOW64 \ WindowsPowerShell \ v1.0 \ powershell.exe cela fonctionne très bien. Mais lorsque je tente de faire la même chose dans la version 64 bits ici: C: \ Windows \ system32 \ WindowsPowerShell \ v1.0 \ powershell.exe Je reçois l'erreur suivante:

Add-PSSnapin : The Windows PowerShell snap-in 'Microsoft.TeamFoundation.PowerShell' is not installed on this machine. 
At line:1 char:13 
+ Add-PSSnapin <<<< Microsoft.TeamFoundation.PowerShell 
    + CategoryInfo   : InvalidArgument: (Microsoft.TeamFoundation.PowerShell:String) [Add-PSSnapin], PSArgument 
    Exception 
    + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand 

Tous idée comment le faire fonctionner dans la version 64 bits? Merci d'avance.

Répondre

2

Cathy Kong de Microsoft a eu la gentillesse de me fournir une solution de contournement pour ce problème. Les détails peuvent être trouvés ici dans le forum PowerTools TFS MSDN: http://social.msdn.microsoft.com/Forums/en-US/tfspowertools/thread/a116799a-0476-4c42-aa3e-45d8ba23739e/?prof=required

Le correctif est la suivante et a bien fonctionné pour moi:

Please save the following content and save it as *.reg file and import to Registry(just double click the *.reg file, click OK double)

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellSnapIns\Microsoft.TeamFoundation.PowerShell] "PowerShellVersion"="2.0" "Vendor"="Microsoft Corporation" "Description"="This is a PowerShell snap-in that includes the Team Foundation Server cmdlets." "VendorIndirect"="Microsoft.TeamFoundation.PowerShell,Microsoft" "DescriptionIndirect"="Microsoft.TeamFoundation.PowerShell,This is a PowerShell snap-in that includes the Team Foundation Server cmdlets." "Version"="10.0.0.0" "ApplicationBase"="C:\Program Files (x86)\Microsoft Team Foundation Server 2010 Power Tools" "AssemblyName"="Microsoft.TeamFoundation.PowerTools.PowerShell, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" "ModuleName"="C:\Program Files (x86)\Microsoft Team Foundation Server 2010 Power Tools\Microsoft.TeamFoundation.PowerTools.PowerShell.dll" "CustomPSSnapInType"="Microsoft.TeamFoundation.PowerTools.PowerShell.TFPSSnapIn"

+0

J'ai dû échapper aux barres obliques comme indiqué dans la réponse de Sergey (par exemple "C: \\", pas "C: \"). Sinon, ces valeurs n'ont pas été importées dans le registre. – Jared

5

Vous l'avez obtenu à l'envers. Le snapin est un snapin 32 bits. Cela fonctionne bien sous PowerShell (x86), c'est-à-dire 32 bits mais ne fonctionne pas sous PowerShell (x64). Remarque: même si le dossier s'appelle SysWOW64, il n'est pas 64 bits. Sous Windows 64 bits, les binaires 64 bits natifs vont dans $ env: SystemRoot \ System32. Les binaires 32 bits qui s'exécutent sous une couche Windows-on-Windows64 (c'est-à-dire un thunk issu d'un processus 32 bits et des pointeurs vers des systèmes d'exploitation 64 bits) vont dans $ env: SystemRoot \ SysWOW64.

+1

Merci de m'avoir corrigé. Je vais éditer ma question et la corriger. Mais pourriez-vous avoir quelque chose qui résout mon problème? :) – urig

+0

@urig c'est un snapin 32bit! Cela ne fonctionnera pas sous 64 bits. –

3

fichier de registre pour les outils électriques TFS 2012:

Windows Registry Editor Version 5.00 

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellSnapIns\Microsoft.TeamFoundation.PowerShell] 
"PowerShellVersion"="2.0" 
"Vendor"="Microsoft Corporation" 
"Description"="This is a PowerShell snap-in that includes the Team Foundation Server cmdlets." 
"VendorIndirect"="Microsoft.TeamFoundation.PowerShell,Microsoft" 
"DescriptionIndirect"="Microsoft.TeamFoundation.PowerShell,This is a PowerShell snap-in that includes the Team Foundation Server cmdlets." 
"Version"="11.0.0.0" 
"ApplicationBase"="C:\\Program Files (x86)\\Microsoft Team Foundation Server 2012 Power Tools" 
"AssemblyName"="Microsoft.TeamFoundation.PowerTools.PowerShell, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 
"ModuleName"="C:\\Program Files (x86)\\Microsoft Team Foundation Server 2012 Power Tools\\Microsoft.TeamFoundation.PowerTools.PowerShell.dll" 
"CustomPSSnapInType"="Microsoft.TeamFoundation.PowerTools.PowerShell.TFPSSnapIn" 
Questions connexes