Visual Studio 2022 Initialization Failure after upgrading to SonarLint 6.4.1.47693

Please provide

  • Operating system:
    Windows Server 2022 Standard 21H2
  • IDE name and flavor/env:
    Visual Studio 2022 Enterprise 17.1.6
  • SonarLint plugin version:
    6.4.1.47693
  • Is connected mode used:
    • Connected to SonarCloud or SonarQube (and which version):
      No
  • And a thorough description of the problem / question:
  • After upgrading to 6.4.1.47693 and (obviously) restarting Visual Studio, VS reports plug-in (~OpenIdePackage?) initialization failure on startup.
  • ActivityLog.xml contains one exception: SetSite failed for package [SonarLintIntegrationPackage]Source: ‘SonarLint.2022’, NullReferenceException (details lost)
  • 1st uninstalling SonarLint did not uninstall SonarLint, new errors in ActivityLog (yet unrelated to SL), 2nd attempt successful
  • SLAX(?) extension appeared in Extensions, had to be uninstalled twice as well

Re-installing the SL extension resolved the issue.

Hello Henry,

Thank you for this report.

Are there any additional details in the ActivityLog.xml?
You mentioned that the details were lost, is there anything there that can be useful?
Perhaps regarding the SLAF extension (which is part of the SonarLint extension)? Or any other “SetSite failed for package” errors with the stack trace?

Visual Studio overwrites the ActivityLog.xml.
Should have saved that after the issue.
I don’t know why the SL extensions did not uninstall on the first attempt - if a MEX (cache) corruption was the issue, un-installing and re-installing fixed that.
Next time, I’ll save the log files.

1 Like

Thank you! If it happens again, please share the logs with us, and we can investigate.

Update: this looks to be caused by MEF cache corruption. We can’t do anything to stop the cache corruption, but we could try to improve the user experience when it occurs. We’ve created SLVS-3029 to track this.