如何从 VSPackage 打开 TFS "View History" window?

How to open the TFS "View History" window from a VSPackage?

我正在为 Visual Studio 编写一个 VSPackage,其中包含一个工具 window 以显示 TFS 中的项目列表。单击其中一项后,我想打开 "View History" window。如何以编程方式打开此 window?

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

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