VS 2012 TFS Source Control Explorer - Add Item to

2019-09-07 12:01发布

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?

2条回答
姐就是有狂的资本
2楼-- · 2019-09-07 12:17

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

查看更多
Explosion°爆炸
3楼-- · 2019-09-07 12:19

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

查看更多
登录 后发表回答