Installing SonarLint on VS2019 fails

Hello There,

I’ve been researching this exception and I stumbled upon this thread here.

I have the same issue, yet I get this when installing the extension, So I am not able to install the extension in my Visual Studio (Enterprise 2019 v16.8.30907).

So basically I tried installing directly by downloading the extension and through VS Extension Manager UI, when I restart VS for the installation to complete, the installer crashes.

image

And here are the logs attached.

System.Runtime.InteropServices.COMException (0x80070490): Element not found. (Exception from HRESULT: 0x80070490)
   at Microsoft.VisualStudio.Setup.Configuration.ISetupConfiguration2.GetInstanceForPath(String path)
   at VSIXInstaller.LocationBasedSKU..ctor(String appidInstallPath, String appidName, Version vsVersion, String edition, String rootSuffix)
   at VSIXInstaller.LocationBasedSKU..ctor(String appidInstallPath, String appidName, Version vsVersion, String edition, String rootSuffix, IntPtr alternateUserToken)
   at VSIXInstaller.ExtensionService.GetInstallableDataImpl(IInstallableExtension extension, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable`1& skuData)
   at VSIXInstaller.ExtensionService.GetInstallableData(String vsixPath, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable`1& skuData)
   at VSIXInstaller.ExtensionService.ComputeInstallableExtensions(IStateData stateData, Boolean isRepairSupported, Boolean isExtensionPack, IDictionary`2 skuDataMapping, IList`1 installableExtensionsPaths)
   at VSIXInstaller.App.Initialize(Boolean isRepairSupported)
   at VSIXInstaller.App.Initialize()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

dd_VSIXInstaller_20211223084324_5cb8.txt (5.5 KB)

Hi @Salim_Awad - welcome to the community.

FYI I’ve split your post into a new thread. It is almost always best to start a new thread rather than posting to an old one, as even if issues appear to be the same the underlying cause can be quite different. In this case, the issues are clearly different, as your problem occurs during installation of the extension rather than when Visual Studio is running.

Unfortunately, it’s likely that this issue is due to a problem with your local VS installation, rather than the SonarLint extension. There are a couple of things you could try:

  • upgrade to the latest VS2019 update, and
  • run the VS Installer and “repair” your installation

… then try to install the extension again.