Maximize the power of SQL Prompt with SQL Toolbelt Essentials. Watch now.

"Object reference not set to an instance of an object." during SSMS startup

pw1pw1 Posts: 1 New member
Immediately after starting SQL Server Management Studio I get an UI error report dialogue stating that "Object reference not set to an instance of an object.".

The log file of SQL prompt says:

<div>2022-02-24 11:16:12.868 +01:00 [Information] Logging level set to 'Information'</div><div>2022-02-24 11:16:13.670 +01:00 [Information] Launching package entry point Ssms18 (version 15.0.18390.0) for SQL Prompt</div><div>2022-02-24 11:16:13.742 +01:00 [Information] Initialising DTE and AddIn connections.</div><div>DTE.FullName: C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe</div><div>DTE.Version: 2019.0150</div><div>DTE.CommandLine:&nbsp;</div><div>Current culture: de-AT</div><div>Current UI culture: en-US</div><div>2022-02-24 11:16:14.783 +01:00 [Error] Report error dialog UI shown</div><div>System.NullReferenceException: Object reference not set to an instance of an object.</div><div>&nbsp; &nbsp;at Format.Engine.Styles.Saving.StyleFilePathGenerator.GetFilePath(FormattingStyle style)</div><div>&nbsp; &nbsp;at Format.Engine.Styles.Upgrading.StyleFileNamesUpgrader.<Upgrade>d__5.MoveNext()</div><div>&nbsp; &nbsp;at Format.Engine.Styles.Upgrading.StylesUpgrader.Upgrade()</div><div>&nbsp; &nbsp;at RedGate.SQLPrompt.CommonUI.Shell.StartUpActions.UpgradeFormattingStyles(ILog logger, IStylesUpgrader stylesUpgrader)</div><div>&nbsp; &nbsp;at RedGate.SQLPrompt.CommonUI.Shell.StartUpActions.Run(DevelopmentEnvironment developmentEnvironment)</div><div>&nbsp; &nbsp;at RedGate.SqlPrompt.EntryPointCommon.BaseConnect.Initialize(IKernel kernel, DTE2 dte)</div><div>&nbsp; &nbsp;at RedGate.SqlPrompt.SsmsCommon.AbstractSsmsConnect.Initialize(IKernel kernel, DTE2 dte)</div><div>&nbsp; &nbsp;at RedGate.SqlPrompt.SsmsCommon.AbstractSsmsConnect.VsPackageInitialize(IKernel kernel, DTE dte)</div><div>&nbsp; &nbsp;at RedGate.SQLPrompt.SsmsPackage18.SQLPromptSsmsPackage18.<Initialize>b__2_0(ILog logger, IKernel kernel, Action`1 onTabsRestored)</div><div>&nbsp; &nbsp;at RedGate.SqlPrompt.EntryPointCommon.Startup.<>c__DisplayClass0_0.<Initialize>b__0()</div><div>&nbsp; &nbsp;at RedGate.SQLPrompt.UsageReporting.ErrorReporting.ErrorReporterWithUI.Do(Action action)</div>
I already tried to reinstall SQL Prompt to no avail. Any ideas what could be the reason for this error? I can't use SQL Prompt at all right now.


  • AdrianBAdrianB Cambridge, UK Posts: 46 Silver 1
    The problem looks like it is related to your formatting styles.

    Could you let us know the path that you have set for your styles? As you can't start SQL Prompt, you will have to get this from the registry:
    HKEY_CURRENT_USER\Software\Red Gate\SQL Prompt 10\Formatting Styles Folder
    Could you also look in the directory set in that key in the registry and show us a directory listing of the files in there?
    Software Engineer
    Redgate Software
Sign In or Register to comment.