1

我正在为 SSMS 2012 编写一个插件来创建自定义对象资源管理器树上下文菜单,不幸的是,在我执行代码后,对象资源管理器消失了,即使按 F8 也无法显示它。

编码:

public void OnConnection(object application, ext_ConnectMode connectMode, 
  object  addInInst, ref Array custom)
{
    string toolsMenuName = "Tools";
    addInInstance = (AddIn)addInInst;
    applicationObject = (DTE2)addInInstance.DTE;

    objExplorerService = (ObjectExplorerService)ServiceCache.ServiceProvider
      .GetService(typeof(Microsoft.SqlServer.Management.UI.VSIntegration
      .ObjectExplorer.IObjectExplorerService)); 
}

谢谢!!

4

0 回答 0