Comments
11 comments
-
This is the contents of the log.
2025-09-09 18:19:38.354 -04:00 [Information] Logging level set to 'Information'
2025-09-09 18:19:40.095 -04:00 [Information] Launching package entry point Ssms19 (version 20.2.37.0) for SQL Prompt 11.1.0.18267.
2025-09-09 18:19:40.177 -04:00 [Information] Initialising DTE and AddIn connections.
DTE.FullName: C:\Program Files (x86)\Microsoft SQL Server Management Studio 20\Common7\IDE\Ssms.exe
DTE.Version: 20.2
DTE.CommandLine:
Current culture: en-CA
Current UI culture: en-US
2025-09-09 18:19:43.693 -04:00 [Information] SqlPromptApplication initialised (startup took 0:00:00.000)
2025-09-09 18:19:45.425 -04:00 [Information] Current license: Enabled = True, Activated = True, Supported = True, Features = [None]
2025-09-09 18:19:46.034 -04:00 [Information] Sql History initialized successfully
2025-09-09 18:20:14.209 -04:00 [Error] Report error dialog UI shown
System.NullReferenceException: Object reference not set to an instance of an object.
at RedGate.SqlPrompt.CommonUI.Editor.VSEditorWindowBase.GetSqlCmdVariables()
at RedGate.SqlPrompt.CommonUI.Editor.VSEditorWindowBase.OnTextViewSetFocus(ITextViewMonitor textViewMonitor)
2025-09-09 18:20:53.931 -04:00 [Error] Report error dialog UI shown
System.NullReferenceException: Object reference not set to an instance of an object.
at RedGate.SqlPrompt.CommonUI.Editor.VSEditorWindowBase.GetSqlCmdVariables()
at RedGate.SqlPrompt.CommonUI.Editor.VSEditorWindowBase.OnTextViewSetFocus(ITextViewMonitor textViewMonitor)
2025-09-09 18:20:55.897 -04:00 [Information] Created new ServerCandidate for server: LONSQL41236\SOFINASRS
2025-09-09 18:20:56.041 -04:00 [Information] Chosen server capabilities Latest
2025-09-09 18:20:56.506 -04:00 [Information] Populating [LONSQL41236\SOFINASRS].[master] as Latest
2025-09-09 18:20:57.861 -04:00 [Warning] Could not find table 279672044 for PK column 1 - perhaps it's on a table type
2025-09-09 18:20:58.192 -04:00 [Information] [LONSQL41236\SOFINASRS].[master] Cache finished with no warnings
2025-09-09 18:20:58.341 -04:00 [Information] Populating [LONSQL41236\SOFINASRS].[QMG_DW] as Latest
2025-09-09 18:20:59.091 -04:00 [Information] [LONSQL41236\SOFINASRS].[QMG_DW] Cache finished with no warnings
-
2025-09-05 08:18:25.149 -04:00 [Error] Report error dialog UI shown
System.NullReferenceException: Object reference not set to an instance of an object.
at RedGate.SqlPrompt.CommonUI.Editor.VSEditorWindowBase.GetSqlCmdVariables()
at RedGate.SqlPrompt.CommonUI.Editor.VSEditorWindowBase.OnTextViewSetFocus(ITextViewMonitor textViewMonitor)
-
2025-09-07 18:30:01.510 -04:00 [Error] Report error dialog UI shown
System.NullReferenceException: Object reference not set to an instance of an object.
at RedGate.SqlPrompt.CommonUI.Editor.VSEditorWindowBase.GetSqlCmdVariables()
at RedGate.SqlPrompt.CommonUI.Editor.VSEditorWindowBase.OnTextViewSetFocus(ITextViewMonitor textViewMonitor)
2025-09-07 18:38:16.320 -04:00 [Error] Report error dialog UI shown
System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
at EnvDTE.Document.get_Saved()
at RedGate.SqlPrompt.SqlHistory.Monitoring.OpenDocumentStore.GetQueryIdentity(IDocumentWrapper document)
at RedGate.SqlPrompt.SqlHistory.Monitoring.DocumentEventsProcessor.AddContentsRevision(IDocumentWrapper document, SaveReason saveReason)
at RedGate.SqlPrompt.UsageReporting.ErrorReporting.ErrorReporterWithUI.Do(Action action)
-
2025-09-07 18:43:10.375 -04:00 [Error] Report error dialog UI shown
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at RedGate.SqlPrompt.CommonUI.ConnectionColoring.RegisteredServers.RegisteredServersWindow.AddMenuItem(RegisteredServersMenuItemBase menuItem)
at RedGate.SqlPrompt.CommonUI.ConnectionColoring.ExplorerMenuItemsController.AddMenuItems()
at RedGate.SqlPrompt.CommonUI.ConnectionColoring.ConnectionColoringConnect.<RefreshCategories>b__10_0()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at RedGate.SqlPrompt.CommonUI.Utils.UIThreadInvoker.<>c__DisplayClass7_0.<BeginInvoke>b__1()
at RedGate.SqlPrompt.UsageReporting.ErrorReporting.ErrorReporterWithUI.Do(Action action)
-
2025-09-07 21:14:21.372 -04:00 [Error] Report error dialog UI shown
System.NullReferenceException: Object reference not set to an instance of an object.
at RedGate.SqlPrompt.CommonUI.Editor.VSEditorWindowBase.GetSqlCmdVariables()
at RedGate.SqlPrompt.CommonUI.Editor.VSEditorWindowBase.OnTextViewSetFocus(ITextViewMonitor textViewMonitor)
-
2025-09-09 18:20:14.209 -04:00 [Error] Report error dialog UI shown
System.NullReferenceException: Object reference not set to an instance of an object.
at RedGate.SqlPrompt.CommonUI.Editor.VSEditorWindowBase.GetSqlCmdVariables()
at RedGate.SqlPrompt.CommonUI.Editor.VSEditorWindowBase.OnTextViewSetFocus(ITextViewMonitor textViewMonitor)
2025-09-09 18:20:53.931 -04:00 [Error] Report error dialog UI shown
System.NullReferenceException: Object reference not set to an instance of an object.
at RedGate.SqlPrompt.CommonUI.Editor.VSEditorWindowBase.GetSqlCmdVariables()
at RedGate.SqlPrompt.CommonUI.Editor.VSEditorWindowBase.OnTextViewSetFocus(ITextViewMonitor textViewMonitor)
-
Also receiving this sometimes.
-
I additionally get this error all the time, it seems to be when I close a designer in SSMS 21.
-
Continuously receiving same error, even while typing a query or selecting any object from intellisense. Also, on pressing F12 to open stored procedure definition. I am using SSMS21.

-
Same for me …

-
When you use SQL Prompt with SSMS 21, the “unexpected error” messages appear because the old version of SQL Prompt doesn’t work well with the new SSMS update. To fix this, first uninstall SQL Prompt completely. Then install SSMS 21 again and after that install the latest version of SQL Prompt, version 11 or newer. Make sure you keep the default install location. If the problem still happens, go to the Extensions menu in SSMS, open Customize Menus, uncheck both SQL Prompt options, save and restart SSMS. Then check only the second SQL Prompt option and restart again. You can also delete the SSMS cache folders from AppData to remove any old settings. After these steps, the error messages should stop showing when you close your tabs.
Add comment
Please sign in to leave a comment.
When using sql prompt with ssms 21 I am continously bombarded with “unexpected error” dialogs, generally when closing a tab. This doesn't happen in SSMS 20.