Sonarlint for VS 2015 won't install because VS 2010 is also on the machine

Please provide

  • Operating system: Windows 10 20H2
  • IDE name and flavor/env: VS 2015 and VS 2010
  • SonarLint plugin version: don’t know for sure, trying to install version for VS 2015
  • Is connected mode used:
    • Connected to SonarCloud or SonarQube (and which version):

And a thorough description of the problem / question: I have an application that requires VS 2010 because of some pre-historic C code. The issue is really the .Net version. Those projects must be compiled using .Net 3.5 while the rest of the projects in the solution are VS 2015 and .Net 4.8. I tried installing Sonarlint for VS 2015 but it dies as soon as it detects VS 2010.

4/13/2022 5:15:10 PM - Microsoft VSIX Installer
4/13/2022 5:15:10 PM - -------------------------------------------
4/13/2022 5:15:10 PM - Initializing Install...
4/13/2022 5:15:10 PM - Extension Details...
4/13/2022 5:15:10 PM - 	Identifier         : SonarLint.8c442ec8-0208-4840-b83f-acd24f41acf7
4/13/2022 5:15:10 PM - 	Name               : SonarLint for Visual Studio 2015
4/13/2022 5:15:10 PM - 	Author             : SonarSource
4/13/2022 5:15:10 PM - 	Version            : 4.38.0.36876
4/13/2022 5:15:10 PM - 	Description        : Roslyn based static code analysis: Find and instantly fix nasty bugs and code smells in C#, VB.Net, C, C++ and JS.
4/13/2022 5:15:10 PM - 	Locale             : en-US
4/13/2022 5:15:10 PM - 	MoreInfoURL        : http://vs.sonarlint.org/
4/13/2022 5:15:10 PM - 	InstalledByMSI     : False
4/13/2022 5:15:10 PM - 	SupportedFrameworkVersionRange : [4.6,)
4/13/2022 5:15:10 PM - 
4/13/2022 5:15:12 PM - 	SignatureState     : ValidSignature
4/13/2022 5:15:12 PM - 	SignedBy           : Sonarsource SA
4/13/2022 5:15:12 PM - 	Certificate Info   : 
4/13/2022 5:15:12 PM - 		-------------------------------------------------------
4/13/2022 5:15:12 PM - 		[Subject]       : CN=Sonarsource SA, O=Sonarsource SA, L=GENÈVE, C=CH
4/13/2022 5:15:12 PM - 		[Issuer]        : CN=Symantec Class 3 SHA256 Code Signing CA, OU=Symantec Trust Network, O=Symantec Corporation, C=US
4/13/2022 5:15:12 PM - 		[Serial Number] : 17EF71F9FA5FF72F2C504248CEF5F950
4/13/2022 5:15:12 PM - 		[Not Before]    : 9/16/2019 8:00:00 PM
4/13/2022 5:15:12 PM - 		[Not After]     : 10/15/2021 7:59:59 PM
4/13/2022 5:15:12 PM - 		[Thumbprint]    : 0EA334E388568CE222CB035D0CDA4B6EF8A7F087
4/13/2022 5:15:12 PM - 
4/13/2022 5:15:12 PM - 	Supported Products : 
4/13/2022 5:15:12 PM - 		Microsoft.VisualStudio.Community
4/13/2022 5:15:12 PM - 			Version : [14.0.25420.0,15.0)
4/13/2022 5:15:12 PM - 
4/13/2022 5:15:12 PM - 	References         : 
4/13/2022 5:15:12 PM - 		-------------------------------------------------------
4/13/2022 5:15:12 PM - 		Identifier   : SonarLint.AdditionalFiles.95521f6c-c3e6-460d-b0e6-aa64acd2fdb1
4/13/2022 5:15:12 PM - 		Name         : SLAF
4/13/2022 5:15:12 PM - 		Version      : [4.38.0.36876]
4/13/2022 5:15:12 PM - 		MoreInfoURL  : 
4/13/2022 5:15:12 PM - 		Nested       : Yes
4/13/2022 5:15:12 PM - 
4/13/2022 5:15:12 PM - Signature Details...
4/13/2022 5:15:12 PM - 	Extension is signed with a valid signature.
4/13/2022 5:15:12 PM - 
4/13/2022 5:15:12 PM - Searching for applicable products...
4/13/2022 5:15:12 PM - Found installed product - Microsoft Visual Studio 2010 Professional
4/13/2022 5:15:12 PM - System.ArgumentNullException: Value cannot be null.
Parameter name: input
   at System.Version.Parse(String input)
   at System.Version..ctor(String version)
   at VSIXInstaller.SupportedVSSKU.get_VersionWithBuildRevisionInfo()
   at VSIXInstaller.App.IsValidSKUForExtension(SupportedVSSKU supportedSKU, IExtension extension, List`1 validSKUs)
   at VSIXInstaller.App.InitializeInstall(Boolean isRepairSupported)
   at VSIXInstaller.App.InitializeInstall()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()

Any idea how to get around this? Thanks.

Hi @gwoolaver - welcome to the community.

The exception is being thrown by the Microsoft VSIX installer, rather than by the SonarLint extension i.e. it looks like a bug on the Microsoft side. I had a quick look on the Microsoft Developer Community site to see if is a known issue, but unfortunately there were so many issues it’s hard to tell.

Can you successfully install any other VS2015 extensions on your machine?

Visual Studio 2015 and later versions can build projects that target .NET 3.5. What problems are you getting when building with a newer version of VS?