Recently had to replace my hard drive. I was using VS2010, 2013 with SSIS and 2017 with SSIS, SSMS2014 and SSMS18.5. I was in a bind so the first thing I installed was SSMS18.8 to get some work done. At this time everything was good and I was hoping not to have to install SSMS2014. I eventually installed (in order) VS2010, VS2013 with SSIS, and VS2017 with SSIS. Each time I opened the newly installed version of VS to make sure everything was okay. VS 2013 with SSIS was fine, but when I installed VS2017 I could not get Business Intelligence projects to show, even though I had installed it. Then I opened SSMS18 and attempted to do a 'Select Top 1000' from a table I have access to and work with on a daily basis, and got the error 'The given key was not present in the dictionary (mscorlib).' Assuming this was something to do with the VS2017 install I uninstalled VS2017 and SSMS18 still gave the error. So, I uninstalled SSMS18 and rebooted. SSMS2014 and VS2013 were still fine. I reinstalled VS2017 and eventually got SSIS to show in the projects. I then reinstalled SSMS18, and I am still getting the error. I also get the same error when I click 'New Query' with and without a table selected.
Below are the details..
===================================
The given key was not present in the dictionary. (mscorlib)
Program Location:
at System.Collections.Generic.Dictionary2.get_Item(TKey key) at Microsoft.VisualStudio.Composition.RuntimeComposition.GetPart(RuntimeExport export) at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportElement(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import, RuntimeExport export, Func
3 lazyFactory)
at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportSite(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import)
at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.SatisfyImports()
at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.SatisfyImmediateImports()
at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass53_0.<CreateExport>b__0()
at System.Lazy1.CreateValue() at System.Lazy
1.LazyInitValue()
at System.Lazy1.get_Value() at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass70_1
2.<GetExports>b__1()
at System.Lazy1.CreateValue() at System.Lazy
1.LazyInitValue()
at System.Lazy1.get_Value() at Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValue[T]() at Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetService[T]() at Microsoft.VisualStudio.Editor.Implementation.EditorParts.get_ContentTypeRegistryService() at Microsoft.VisualStudio.Editor.Implementation.LanguageServiceToContentTypeMapper.MakeLanguageServiceContentTypes(SettingsStore settingsStore) at Microsoft.VisualStudio.Editor.Implementation.LanguageServiceToContentTypeMapper.InitLanguageServiceToContentTypeMapper(IServiceProvider serviceProvider) at Microsoft.VisualStudio.Editor.Implementation.TextDocData.SetSite(Object pUnkSite) --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState) at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0() at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportElement(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import, RuntimeExport export, Func
3 lazyFactory)
at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportSite(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import)
at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.SatisfyImports()
at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.SatisfyImmediateImports()
at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass53_0.<CreateExport>b__0()
at System.Lazy1.CreateValue() at System.Lazy
1.LazyInitValue()
at System.Lazy1.get_Value() at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass70_1
2.<GetExports>b__1()
at System.Lazy1.CreateValue() at System.Lazy
1.LazyInitValue()
at System.Lazy1.get_Value() at Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValue[T]() at Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetService[T]() at Microsoft.VisualStudio.Editor.Implementation.PrimeEditor.SetSite(Object pUnkSite) --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState) at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose() at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass53_0.<CreateExport>b__0() at System.Lazy
1.CreateValue()
at System.Lazy1.LazyInitValue() at System.Lazy
1.get_Value()
at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass70_12.<GetExports>b__1() at System.Lazy
1.CreateValue()
at System.Lazy1.LazyInitValue() at System.Lazy
1.get_Value()
at Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValueT
at Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetServiceT
at Microsoft.VisualStudio.Editor.Implementation.EditorParts.get_ContentTypeRegistryService()
at Microsoft.VisualStudio.Editor.Implementation.LanguageServiceToContentTypeMapper.MakeLanguageServiceContentTypes(SettingsStore settingsStore)
at Microsoft.VisualStudio.Editor.Implementation.LanguageServiceToContentTypeMapper.InitLanguageServiceToContentTypeMapper(IServiceProvider serviceProvider)
at Microsoft.VisualStudio.Editor.Implementation.TextDocData.SetSite(Object pUnkSite)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass53_0.<CreateExport>b__0()
at System.Lazy1.CreateValue() at System.Lazy
1.LazyInitValue()
at System.Lazy1.get_Value() at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass70_1
2.<GetExports>b__1()
at System.Lazy1.CreateValue() at System.Lazy
1.LazyInitValue()
at System.Lazy1.get_Value() at Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValue[T]() at Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetService[T]() at Microsoft.VisualStudio.Editor.Implementation.EditorParts.get_ContentTypeRegistryService() at Microsoft.VisualStudio.Editor.Implementation.LanguageServiceToContentTypeMapper.MakeLanguageServiceContentTypes(SettingsStore settingsStore) at Microsoft.VisualStudio.Editor.Implementation.LanguageServiceToContentTypeMapper.InitLanguageServiceToContentTypeMapper(IServiceProvider serviceProvider) at Microsoft.VisualStudio.Editor.Implementation.TextDocData.SetSite(Object pUnkSite) at Microsoft.SqlServer.Management.UI.VSIntegration.ShellTextBuffer.SetSite(Object serviceProvider) at Microsoft.SqlServer.Management.UI.VSIntegration.ShellTextEditorControl.CreateAndInitTextBuffer(Object sp) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptEditorControl.Initialize(Object sp) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptAndResultsEditorControl.Initialize(Object sp) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.SqlScriptEditorControl.Initialize(Object sp, String moniker) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.SqlScriptEditorControl.CreateInstance(Object serviceProvider, Boolean withEncoding, String moniker) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.EditorFactorySql.CreateEditorInstance(IServiceProvider serviceProvider, Boolean storeActiveConnIfNeeded, String moniker) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.EditorFactoryBase.Microsoft.VisualStudio.Shell.Interop.IVsEditorFactory.CreateEditorInstance(UInt32 createFlags, String moniker, String physicalView, IVsHierarchy hierarchy, UInt32 itemId, IntPtr existingDocData, IntPtr& docViewIntPtr, IntPtr& docDataIntPtr, String& caption, Guid& cmdUIGuid, Int32& result) at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, IVsProject projectToAddScriptTo, UIConnectionGroupInfo connectionInfoList, IDbConnection liveCon, String rootName) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, IVsExternalFilesManager extFileMgr, UIConnectionGroupInfo connectionInfoList, IDbConnection liveCon, String rootName) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, UIConnectionGroupInfo connectionInfoList, IDbConnection liveCon, String fileRoot) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, UIConnectionInfo ci, IDbConnection liveCon) at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.LaunchFormHost.CreateScriptWindow(String text, String scriptType, String dbName) at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.LaunchFormHost.Microsoft.SqlServer.Management.SqlMgmt.ILaunchFormHost3.ScriptToNewDatabaseWindowAndExecute(String text, String scriptType, String dbName) at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.OpenTableHelperClass.SelectTopNRows(NodeContext parentContext, Int32 topNValue) at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.SelectTopNRows.Invoke() at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ToolsMenuItemBase.MenuInvokedHandler(Object sender, EventArgs args) --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState) at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose() at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass53_0.<CreateExport>b__0() at System.Lazy
1.CreateValue()
at System.Lazy1.LazyInitValue() at System.Lazy
1.get_Value()
at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass70_12.<GetExports>b__1() at System.Lazy
1.CreateValue()
at System.Lazy1.LazyInitValue() at System.Lazy
1.get_Value()
at Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValueT
at Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetServiceT
at Microsoft.VisualStudio.Editor.Implementation.EditorParts.get_ContentTypeRegistryService()
at Microsoft.VisualStudio.Editor.Implementation.LanguageServiceToContentTypeMapper.MakeLanguageServiceContentTypes(SettingsStore settingsStore)
at Microsoft.VisualStudio.Editor.Implementation.LanguageServiceToContentTypeMapper.InitLanguageServiceToContentTypeMapper(IServiceProvider serviceProvider)
at Microsoft.VisualStudio.Editor.Implementation.TextDocData.SetSite(Object pUnkSite)
at Microsoft.SqlServer.Management.UI.VSIntegration.ShellTextBuffer.SetSite(Object serviceProvider)
at Microsoft.SqlServer.Management.UI.VSIntegration.ShellTextEditorControl.CreateAndInitTextBuffer(Object sp)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptEditorControl.Initialize(Object sp)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptAndResultsEditorControl.Initialize(Object sp)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.SqlScriptEditorControl.Initialize(Object sp, String moniker)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.SqlScriptEditorControl.CreateInstance(Object serviceProvider, Boolean withEncoding, String moniker)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.EditorFactorySql.CreateEditorInstance(IServiceProvider serviceProvider, Boolean storeActiveConnIfNeeded, String moniker)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.EditorFactoryBase.Microsoft.VisualStudio.Shell.Interop.IVsEditorFactory.CreateEditorInstance(UInt32 createFlags, String moniker, String physicalView, IVsHierarchy hierarchy, UInt32 itemId, IntPtr existingDocData, IntPtr& docViewIntPtr, IntPtr& docDataIntPtr, String& caption, Guid& cmdUIGuid, Int32& result)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, IVsProject projectToAddScriptTo, UIConnectionGroupInfo connectionInfoList, IDbConnection liveCon, String rootName)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, IVsExternalFilesManager extFileMgr, UIConnectionGroupInfo connectionInfoList, IDbConnection liveCon, String rootName)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, UIConnectionGroupInfo connectionInfoList, IDbConnection liveCon, String fileRoot)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, UIConnectionInfo ci, IDbConnection liveCon)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.LaunchFormHost.CreateScriptWindow(String text, String scriptType, String dbName)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.LaunchFormHost.Microsoft.SqlServer.Management.SqlMgmt.ILaunchFormHost3.ScriptToNewDatabaseWindowAndExecute(String text, String scriptType, String dbName)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.OpenTableHelperClass.SelectTopNRows(NodeContext parentContext, Int32 topNValue)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.SelectTopNRows.Invoke()
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ToolsMenuItemBase.MenuInvokedHandler(Object sender, EventArgs args)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass53_0.<CreateExport>b__0()
at System.Lazy1.CreateValue() at System.Lazy
1.LazyInitValue()
at System.Lazy1.get_Value() at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass70_1
2.<GetExports>b__1()
at System.Lazy1.CreateValue() at System.Lazy
1.LazyInitValue()
at System.Lazy1.get_Value() at Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValue[T]() at Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetService[T]() at Microsoft.VisualStudio.Editor.Implementation.EditorParts.get_ContentTypeRegistryService() at Microsoft.VisualStudio.Editor.Implementation.LanguageServiceToContentTypeMapper.MakeLanguageServiceContentTypes(SettingsStore settingsStore) at Microsoft.VisualStudio.Editor.Implementation.LanguageServiceToContentTypeMapper.InitLanguageServiceToContentTypeMapper(IServiceProvider serviceProvider) at Microsoft.VisualStudio.Editor.Implementation.TextDocData.SetSite(Object pUnkSite) at Microsoft.SqlServer.Management.UI.VSIntegration.ShellTextBuffer.SetSite(Object serviceProvider) at Microsoft.SqlServer.Management.UI.VSIntegration.ShellTextEditorControl.CreateAndInitTextBuffer(Object sp) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptEditorControl.Initialize(Object sp) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptAndResultsEditorControl.Initialize(Object sp) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.SqlScriptEditorControl.Initialize(Object sp, String moniker) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.SqlScriptEditorControl.CreateInstance(Object serviceProvider, Boolean withEncoding, String moniker) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.EditorFactorySql.CreateEditorInstance(IServiceProvider serviceProvider, Boolean storeActiveConnIfNeeded, String moniker) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.EditorFactoryBase.Microsoft.VisualStudio.Shell.Interop.IVsEditorFactory.CreateEditorInstance(UInt32 createFlags, String moniker, String physicalView, IVsHierarchy hierarchy, UInt32 itemId, IntPtr existingDocData, IntPtr& docViewIntPtr, IntPtr& docDataIntPtr, String& caption, Guid& cmdUIGuid, Int32& result) at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, IVsProject projectToAddScriptTo, UIConnectionGroupInfo connectionInfoList, IDbConnection liveCon, String rootName) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, IVsExternalFilesManager extFileMgr, UIConnectionGroupInfo connectionInfoList, IDbConnection liveCon, String rootName) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, UIConnectionGroupInfo connectionInfoList, IDbConnection liveCon, String fileRoot) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, UIConnectionInfo ci, IDbConnection liveCon) at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.LaunchFormHost.CreateScriptWindow(String text, String scriptType, String dbName) at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.LaunchFormHost.Microsoft.SqlServer.Management.SqlMgmt.ILaunchFormHost3.ScriptToNewDatabaseWindowAndExecute(String text, String scriptType, String dbName) at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.OpenTableHelperClass.SelectTopNRows(NodeContext parentContext, Int32 topNValue) at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.SelectTopNRows.Invoke() at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ToolsMenuItemBase.MenuInvokedHandler(Object sender, EventArgs args) --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState) at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose() at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass53_0.<CreateExport>b__0() at System.Lazy
1.CreateValue()
at System.Lazy1.LazyInitValue() at System.Lazy
1.get_Value()
at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass70_12.<GetExports>b__1() at System.Lazy
1.CreateValue()
at System.Lazy1.LazyInitValue() at System.Lazy
1.get_Value()
at Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValueT
at Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetServiceT
at Microsoft.VisualStudio.Editor.Implementation.EditorParts.get_ContentTypeRegistryService()
at Microsoft.VisualStudio.Editor.Implementation.LanguageServiceToContentTypeMapper.MakeLanguageServiceContentTypes(SettingsStore settingsStore)
at Microsoft.VisualStudio.Editor.Implementation.LanguageServiceToContentTypeMapper.InitLanguageServiceToContentTypeMapper(IServiceProvider serviceProvider)
at Microsoft.VisualStudio.Editor.Implementation.TextDocData.SetSite(Object pUnkSite)
at Microsoft.SqlServer.Management.UI.VSIntegration.ShellTextBuffer.SetSite(Object serviceProvider)
at Microsoft.SqlServer.Management.UI.VSIntegration.ShellTextEditorControl.CreateAndInitTextBuffer(Object sp)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptEditorControl.Initialize(Object sp)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptAndResultsEditorControl.Initialize(Object sp)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.SqlScriptEditorControl.Initialize(Object sp, String moniker)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.SqlScriptEditorControl.CreateInstance(Object serviceProvider, Boolean withEncoding, String moniker)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.EditorFactorySql.CreateEditorInstance(IServiceProvider serviceProvider, Boolean storeActiveConnIfNeeded, String moniker)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.EditorFactoryBase.Microsoft.VisualStudio.Shell.Interop.IVsEditorFactory.CreateEditorInstance(UInt32 createFlags, String moniker, String physicalView, IVsHierarchy hierarchy, UInt32 itemId, IntPtr existingDocData, IntPtr& docViewIntPtr, IntPtr& docDataIntPtr, String& caption, Guid& cmdUIGuid, Int32& result)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, IVsProject projectToAddScriptTo, UIConnectionGroupInfo connectionInfoList, IDbConnection liveCon, String rootName)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, IVsExternalFilesManager extFileMgr, UIConnectionGroupInfo connectionInfoList, IDbConnection liveCon, String rootName)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, UIConnectionGroupInfo connectionInfoList, IDbConnection liveCon, String fileRoot)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, UIConnectionInfo ci, IDbConnection liveCon)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.LaunchFormHost.CreateScriptWindow(String text, String scriptType, String dbName)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.LaunchFormHost.Microsoft.SqlServer.Management.SqlMgmt.ILaunchFormHost3.ScriptToNewDatabaseWindowAndExecute(String text, String scriptType, String dbName)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.OpenTableHelperClass.SelectTopNRows(NodeContext parentContext, Int32 topNValue)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.SelectTopNRows.Invoke()
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ToolsMenuItemBase.MenuInvokedHandler(Object sender, EventArgs args)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass53_0.<CreateExport>b__0()
at System.Lazy1.CreateValue() at System.Lazy
1.LazyInitValue()
at System.Lazy1.get_Value() at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass70_1
2.<GetExports>b__1()
at System.Lazy1.CreateValue() at System.Lazy
1.LazyInitValue()
at System.Lazy1.get_Value() at Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValue[T]() at Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetService[T]() at Microsoft.VisualStudio.Editor.Implementation.EditorParts.get_ContentTypeRegistryService() at Microsoft.VisualStudio.Editor.Implementation.LanguageServiceToContentTypeMapper.MakeLanguageServiceContentTypes(SettingsStore settingsStore) at Microsoft.VisualStudio.Editor.Implementation.LanguageServiceToContentTypeMapper.InitLanguageServiceToContentTypeMapper(IServiceProvider serviceProvider) at Microsoft.VisualStudio.Editor.Implementation.TextDocData.SetSite(Object pUnkSite) at Microsoft.SqlServer.Management.UI.VSIntegration.ShellTextBuffer.SetSite(Object serviceProvider) at Microsoft.SqlServer.Management.UI.VSIntegration.ShellTextEditorControl.CreateAndInitTextBuffer(Object sp) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptEditorControl.Initialize(Object sp) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptAndResultsEditorControl.Initialize(Object sp) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.SqlScriptEditorControl.Initialize(Object sp, String moniker) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.SqlScriptEditorControl.CreateInstance(Object serviceProvider, Boolean withEncoding, String moniker) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.EditorFactorySql.CreateEditorInstance(IServiceProvider serviceProvider, Boolean storeActiveConnIfNeeded, String moniker) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.EditorFactoryBase.Microsoft.VisualStudio.Shell.Interop.IVsEditorFactory.CreateEditorInstance(UInt32 createFlags, String moniker, String physicalView, IVsHierarchy hierarchy, UInt32 itemId, IntPtr existingDocData, IntPtr& docViewIntPtr, IntPtr& docDataIntPtr, String& caption, Guid& cmdUIGuid, Int32& result) at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, IVsProject projectToAddScriptTo, UIConnectionGroupInfo connectionInfoList, IDbConnection liveCon, String rootName) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, IVsExternalFilesManager extFileMgr, UIConnectionGroupInfo connectionInfoList, IDbConnection liveCon, String rootName) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, UIConnectionGroupInfo connectionInfoList, IDbConnection liveCon, String fileRoot) at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewScript(String strFullPathToScript, UIConnectionInfo ci, IDbConnection liveCon) at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.LaunchFormHost.CreateScriptWindow(String text, String scriptType, String dbName) at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.LaunchFormHost.Microsoft.SqlServer.Management.SqlMgmt.ILaunchFormHost3.ScriptToNewDatabaseWindowAndExecute(String text, String scriptType, String dbName) at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.OpenTableHelperClass.SelectTopNRows(NodeContext parentContext, Int32 topNValue) at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.SelectTopNRows.Invoke() at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ToolsMenuItemBase.MenuInvokedHandler(Object sender, EventArgs args) --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState) at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose() at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass53_0.<CreateExport>b__0() at System.Lazy
1.CreateValue()
at System.Lazy1.LazyInitValue() at System.Lazy
1.get_Value()
at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass70_12.<GetExports>b__1() at System.Lazy
1.CreateValue()
at System.Lazy1.LazyInitValue() at System.Lazy
1.get_Value()
at Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValueT
at Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetServiceT
at Microsoft.VisualStudio.Editor.Implementation.EditorParts.get_ContentTypeRegistryService()
at Microsoft.VisualStudio.Editor.Implementation.LanguageServiceToContentTypeMapper.MakeLanguageServiceContentTypes(SettingsStore settingsStore)
at Microsoft.VisualStudio.Editor.Implementation.LanguageServiceToContentTypeMapper.InitLanguageServiceToContentTypeMapper(IServiceProvider serviceProvider)
at Microsoft.VisualStudio.Editor.Implementation.EditorPackage.<InitializeAsync>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Shell.AsyncPackage.<>c__DisplayClass17_0.<<Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.ThreadingTools.<WithCancellationSlow>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.JoinableTask.<JoinAsync>d__78.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
at Microsoft.VisualStudio.Threading.JoinableTask.Join(CancellationToken cancellationToken)
at Microsoft.VisualStudio.Threading.JoinableTask1.Join(CancellationToken cancellationToken) at Microsoft.VisualStudio.Shell.VsTaskLibraryHelper.<>c__DisplayClass33_1
1.<AsVsTask>b__3()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)
at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)
at Microsoft.VisualStudio.Services.VsTask.GetResult()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleSta