SQL Консоль управления сервером sql редактор перестал работать должным образом, ожидал экспорта ITextEditorFactoryService, но обнаружил 0 - PullRequest
0 голосов
/ 21 января 2020

После некоторых обновлений программного обеспечения и системы SQL Серверная консоль управления версии 17.9.1 перестала работать должным образом. Кажется, проблема связана с компонентом редактора sql. Не могу с уверенностью сказать, что проблема связана с обновлениями, но она возникла после этого.

Проблема обновлений:

  • Windows Обновление
  • Обновление Visual Studio 2017
  • Установка. NET Core SDK 3.1.101

Полный дамп ошибок следующий:

===================================

Failed to create new SQL Server script.

===================================

Expected 1 export(s) with contract name "Microsoft.VisualStudio.Text.Editor.ITextEditorFactoryService" but found 0 after applying applicable constraints. (mscorlib)

------------------------------
Program Location:

   at Microsoft.VisualStudio.Composition.ExportProvider.GetExports(ImportDefinition importDefinition)
   at Microsoft.VisualStudio.Composition.ExportProvider.GetExports[T,TMetadataView](String contractName, ImportCardinality cardinality)
   at Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T,TMetadataView](String contractName)
   at Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T](String contractName)
   at Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T]()
   at Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValue[T]()
   at Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetService[T]()
   at Microsoft.VisualStudio.Editor.Implementation.EditorParts.get_TextEditorFactoryService()
   at Microsoft.VisualStudio.Editor.Implementation.CompoundTextViewWindow.InitializeView(SimpleTextViewWindow simpleTextViewWindow)
   at Microsoft.VisualStudio.Editor.Implementation.CompoundTextViewWindow.CreateAndAddView()
   at Microsoft.VisualStudio.Editor.Implementation.CompoundTextViewWindow.SetSite(Object pUnkSite)
   at Microsoft.VisualStudio.Editor.Implementation.CompoundTextViewWindow.Initialize()
   at Microsoft.VisualStudio.Shell.WindowPane.InternalSetSite(IServiceProvider p)
   at Microsoft.VisualStudio.Shell.WindowPane.Microsoft.VisualStudio.Shell.Interop.IVsWindowPane.SetSite(IServiceProvider psp)
   at Microsoft.SqlServer.Management.UI.VSIntegration.ShellCodeWindowControl.CreateEditorWindow(Object nativeSP)
   at Microsoft.SqlServer.Management.UI.VSIntegration.ShellTextEditorControl.CreateAndInitEditorWindow(Object sp)
   at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptEditorControl.SetSite(IServiceProvider sp)
   at Microsoft.VisualStudio.Platform.WindowManagement.WindowPaneDocumentObject.SetSite(DocumentObjectSite site)
   at Microsoft.VisualStudio.Platform.WindowManagement.DocumentObjectSite.InitializeDocumentObject(Object punkView)
   at Microsoft.VisualStudio.Platform.WindowManagement.WindowManagerService.CreateContentPane(FrameMoniker frameMoniker, Boolean isDocument, String lpstrMkDoc, UInt32 eCreateWindowFlags, Object punkView, Object punkData, IServiceProvider pServiceProvider, IVsUIHierarchy pUIHierarchy, UInt32 vsid, Guid rguidCmdUI, ViewGroup parent, IVsWindowFrame& ppWindowFrame)
   at Microsoft.VisualStudio.Platform.WindowManagement.WindowManagerService.CreateContentPane(String pszName, Int32 fDockViewOn, Int32 fDocument, String lpstrMkDoc, UInt32 eCreateWindowFlags, UInt32 dwToolWinId, Object punkView, Object punkData, IServiceProvider pServiceProvider, IVsUIHierarchy pUIHierarchy, UInt32 vsid, Int32& pfDefaultPosition, Guid& rguidCmdUI, IVsWindowFrame& ppWindowFrame)
   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, IVsExternalFilesManager extFileMgr, UIConnectionInfo connectionInfo, IDbConnection liveCon, String rootName)
   at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.ScriptFactory.CreateNewBlankScript(ScriptType scriptType, UIConnectionInfo ci, IDbConnection liveCon)
   at Microsoft.SqlServer.Management.SqlStudio.OpenConnectionDialogWithGlobalConnectionInfo()

Вот снимок экрана с ошибкой:

enter image description here

По описанию ошибки кажется, что SSMS не удалось разрешить компонент пользовательского интерфейса во время выполнения, который реализует интерфейс " Microsoft.VisualStudio.Text.Editor.ITextEditorFactoryService ".

Я пытался переустановить SSMS 17.9.1 с нуля, но это не помогло решить проблему.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...