Share a link to a location in code (source file / line number) in Visual Studio

百般思念 提交于 2019-11-27 18:07:30

问题


I'm looking for a plugin (may be a TFS plugin) for Visual Studio 2010 that add a 'Copy uri' context menu entry in code editor and would make possible to copy paste a file/line number into an IM conversation (skype) or an email, and of course clicking the link would open the project/file at the correct line number (in an existing instance if VS if possible).

I'm working from home and that would be nice to be able to share easily a code location with team via skype (and sometimes email).

I googled and found nothing, but it's perhaps available in a big plugin like Resharper and not advertised.


回答1:


I wrote an extension for this. It's called CodeLink:

https://marketplace.visualstudio.com/items?itemName=AuriRahimzadeh.CodeLinktm

I'm looking for testers and feedback. I only have so many solutions with which to test it :)




回答2:


There's no such extension that exist from what I know.

However it wouldn't that hard to create a VSX that adds an entry in the Source Code context menu that will get the Source Control path from the Local Path using the TFS Api then putting the result in the clipboard.

In the meantime there's no easy way to come up with a workaround as I'm not aware of a way to get the Source Control path from the Local path in Visual Studio.




回答3:


Its not a plugin, but you can now add a line parameter (eg &line=1234) to a TFS file browser url, and then email that link to a colleague, it will open the file in a browser with the specified line highlighted.



来源:https://stackoverflow.com/questions/10283458/share-a-link-to-a-location-in-code-source-file-line-number-in-visual-studio

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