Uninstall Sonarlint v7.0 for Visual Studio not possible

Please provide

  • Operating system: Windows 10 IoT Enterprise LTSC
  • SonarLint plugin version: v7.0.0.74072-2022
  • Programming language you’re coding in: c#
  • Is connected mode used:
    • Connected to SonarCloud or SonarQube (and which version): connected with 9.9

And a thorough description of the problem / question:
First part of the issue:
I tried to uninstall v7.0 several times until Visual Studio did not show the extension anymore.

Second part of the issue:
After it was not visible in VS anymore I tried to install SonarLint.VSIX- But I get the following problem:
Install Error : Microsoft.VisualStudio.ExtensionManager.ReferenceConstraintException: The extension with identifier ‘SonarLint.0DE19254-1DCA-4479-8EAF-58E5D677FF4D’ could not be installed because one of its references’ constraints (Identifier: ‘SonarLint.AdditionalFiles.95521f6c-c3e6-460d-b0e6-aa64acd2fdb1’, MinVersion:, MaxVersion: could not be satisfied since the reference is currently installed with version

I have also tried to execute vsixinstaller /u:“SonarLint.0DE19254-1DCA-4479-8EAF-58E5D677FF4D” for the v7 version in case that uninstall described in part one above was not done correctly.

I need to go back to v6 since the ruleset files are not stored in the sources anymore in connected mode which I have explained in this post.

@CFA installing and uninstalling Visual Studio extensions is handled entirely by Visual Studio itself and the VSIX command line tool. An extension just provides VS with a manifest of the files in the extension. How those files are added and removed is up to Visual Studio.

I’ve searched the VS feedback site: there are a number of issues related to uninstalling extensions, but can’t find anything that looks quite like the issue you are describing.

We’ve tried to reproduce this issue locally with limited success. One our of devs saw the issue once, but it didn’t reproduce after they had updated their Visual Studio instance to the latest version.
Out of interest, which version of VS are you using?

Manual cleanup by deleting files

NOTE: obviously, this isn’t the recommended way to remove extensions and should only be used as a last resort. I’ve tried it on my machine and it worked for me. Your mileage may vary.

SLVS actually ships as two VSIXes, one dependent on the other. From your error message above it looks like Visual Studio failed to uninstall at least one of the VSIXes. You could try to manually remove the extension as described below.

  1. Close VS

  2. Find the per-user Extensions folder for your VS instance under %LocalAppData%\Local\Microsoft\VisualStudio

e.g. %LocalAppData%\Local\Microsoft\VisualStudio\17.0_c0907d43\Extensions
(the random suffix _c0907d43 is generated by VS. If you have multiple instances of VS installed you will have one folder per VS instance).

  1. Each extension will be installed in a separate, randomly-named folder under the Extensions. Two of those folders will relate to SonarLint. Find and delete those two folders. One of the folders will contain the following:


The other will contain a lot of files prefixed with SonarLint e.g. SonarLint.2022.pkgdef

  1. Restart VS.

You should now be able to install a different version of SonarLint (although if you are installing an older version make sure you uncheck the Automatically update this extension option in the Extensions, Manage Extensions).

1 Like