Hi.
I use ServiceCache.ScriptFactory.CurrentlyActiveWndConnectionInfo (from Microsoft.SqlServer.SqlTools.VSIntegration.VS.dll assembly) to get connection string for currently opened tab.
The problem is that if SQL Server Data Tools is installed NullReferenceException will be generated in ServiceCache.ScriptFactory property.
Analyzed disassembled propery and found that service provider is null. The only ways to initialize it - use SQLWorkbenchPackage.SetSite or ServiceCache.Init methods. But in this case IServiceProvider should be implemented.
Tried to use ScriptFactory.Instance.CurrentlyActiveWndConnectionInfo (from SQLEditors.dll assembly). But COMException is generated - after disassembling found that it happens because current connection isn't found.
Guys, any thoughts? How can I load connection information when SSDT is installed?
Nickolay Laptev