I'm writing an Addin for SSMS 2012 to create a custom Object Explorer tree context menu , unfortunately after I execute the code, the object explorer disappears and I can't show it even if i press on F8.
the code:
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));
}
thanks!!