VS 2012 TFS Source Control Explorer - Add Item to Right Click Menu

情到浓时终转凉″ 提交于 2020-01-07 07:16:07

问题


I have written a PowerShell script that takes a single file as an argument and runs a compare to another file in the background. I'd like to be able to right click a file in Team Foundation Server's Solution Explorer, and choose that file as the argument for my script. I've done the exact same thing for files in the Windows Explorer, but I can't quite figure out how to do it for TFS.

I thought the registry items to be edited would be located at HKCU\Software\Microsoft\VisualStudio\11.0\TeamFoundation\SourceControl\, but I added an item the same way I added it to the Windows Explorer shell, to no avail. Can anyone point me in the right direction?


回答1:


I don't think adding a key to Registry will be enough, you will need to create a Visual Studio Extension for that.

Developing Visual Studio Extensions

Extend Visual Studio

Creating Extensions By Using the VSIX Project Template




回答2:


There is this SO thread that shows how to do this strictly in Visual Studio using Options -> External Tools and Options->Customizing the context menu.

Add an Item to the visual studio folder right-click menu within AddIn



来源:https://stackoverflow.com/questions/26003436/vs-2012-tfs-source-control-explorer-add-item-to-right-click-menu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!