[英]Is there no TFS Snapin for PowerShell on x64?
I am trying to use the TFSSnapin in PowerShell from C# code using System.Management.Automation from the PowerShell SDK, however I would like to compile it using "AnyCPU". 我正在尝试使用PowerShell SDK中的System.Management.Automation从C#代码在PowerShell中使用TFSSnapin,但是我想使用“AnyCPU”编译它。 When I try debugging it in any CPU I get the "No Plugins Registered" error, I try debugging it in x86 mode and it works just fine.
当我尝试在任何CPU中调试它时,我得到“No Plugins Registered”错误,我尝试在x86模式下调试它并且它工作得很好。 Is there anyway to get the Plugins registered on x64 PowerShell so I can use AnyCPU?
反正有没有在x64 PowerShell上注册插件,所以我可以使用AnyCPU? Or am I just out of luck?
或者我只是运气不好?
No. And it can't be changed until TFS 2010 Beta 2 at earliest. 不可以。最早在TFS 2010 Beta 2之前无法更改。 See: Why is the TFS Powershell snapin marked 32-bit only?
请参阅: 为什么TFS Powershell snapin仅标记为32位?
This is now possible 现在这是可能的
Execute the following line in your 64-bit PowerShell command prompt 在64位PowerShell命令提示符中执行以下行
copy
HKLM:\SOFTWARE\Wow6432Node\Microsoft\PowerShell\1\PowerShellSnapIns\Microsoft.TeamFoundation.PowerShell
HKLM:\SOFTWARE\Microsoft\PowerShell\1\PowerShellSnapIns\Microsoft.TeamFoundation.PowerShell
-r
Then add the PSSnapin for Microsoft.TeamFoundation.PowerShell
. 然后为
Microsoft.TeamFoundation.PowerShell
添加PSSnapin。
Make sure you run the 64-bit version of InstallUtil to install the snapin info to the 64-bit registry (not the Wow registry node). 确保运行64位版本的InstallUtil以将snapin信息安装到64位注册表(而不是Wow注册表节点)。 If you start a 64-bit Visual Studio Command Prompt, it should have the path configured to execute the 64-bit version of installutil.exe.
如果启动64位Visual Studio命令提示符,则应将路径配置为执行64位版本的installutil.exe。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.