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.