我正在开发一个插件,用于查看解决方案资源管理器中单击按钮时设置的自定义更改。
我为此需要VersionControlServer引用,但是如果我从解决方案资源管理器中单击按钮,则无法获得该引用,但是如果单击源代码管理资源管理器中的按钮,那么它将起作用。但是我需要从解决方案资源管理器/团队资源管理器中调用它。
this.m_applicationObject = _applicationObject;
this.versionControlExt = (VersionControlExt)this.m_applicationObject.GetObject("Microsoft.VisualStudio.TeamFoundation.VersionControl.VersionControlExt");
this.versionControlServer = this.versionControlExt.Explorer.Workspace.VersionControlServer;
VersionControlExt.Explorer为NULL,如果我从解决方案资源管理器中调用但是,如果我从Source Control Explorer进行调用,那么它将给我带来价值
恐怕您无法通过使用VersionControlExt.Explorer
得到想要的东西。
VersionControlExt.Explorer
仅适用于Source Control Explorer
,而不是Solution Explorer
。
[从this official document查看此:
Besides,不确定this comparison tool extension open source link是否可以为您提供帮助,我希望他们可以根据您的意愿来弥补。