我正在寻找一种从插件代码中自动打开源代码管理资源管理器的方法。 到目前为止,我设法通过执行命令打开它
View.TfsSourceControlExplorer
但是,这似乎不接受任何参数。
我的目标是做这样的事情:
destination = "$/dev/framework/someFolder";
_dteObject.ExecuteCommand("View.TfsSourceControlExplorer", destination);
他们会在指定的目的地向我显示源代码管理资源管理器。
最佳答案
回复 CSharpie 的评论:
Also there seems to be a bug, if you call navigate to a file of the same directory as the explorer currently is in, everything will disappear.
我遇到了同样的问题,有两种解决方法:
- 截断路径中的文件名以仅导航到文件夹。
- 首先导航到根目录 ("$/"),然后导航到您想要的文件。
两者在 VS2013 中都运行良好。
感谢在 SourceControlExplorer 未打开时修复“Application.DoEvent()”。
关于c# - 用于转到源代码管理资源管理器中特定项目的 Visual Studio 命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26056775/