【问题标题】:How to open the TFS "View History" window from a VSPackage?如何从 VSPackage 打开 TFS“查看历史记录”窗口?
【发布时间】:2015-08-24 12:10:31
【问题描述】:

我正在为 Visual Studio 编写一个 VSPackage,其中包含一个工具窗口,用于显示来自 TFS 的项目列表。单击其中一项时,我想打开“查看历史记录”窗口。如何以编程方式打开此窗口?

【问题讨论】:

    标签: envdte vspackage


    【解决方案1】:

    Microsoft.VisualStudio.TeamFoundation.VersionControl.dll 包含此功能。我能够使用以下代码打开历史记录窗口:

    VersionControlExt versionControlExt = dte.GetObject("Microsoft.VisualStudio.TeamFoundation.VersionControl.VersionControlExt") as VersionControlExt;
    versionControlExt.History.Show("$/Path/To/Item", VersionSpec.Latest, 0, RecursionType.Full);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-27
      • 2013-02-13
      • 2022-10-19
      • 2012-01-25
      相关资源
      最近更新 更多