SonarLint with Visual Studio 2019 Fails to Connect


Attempting to connect from Visual Studio 2019 with SonarLint to our SonarQube 8.2 instance produces the following.

Connecting to SonarQube server: https://<removed>/
Connecting to SonarQube server: Validating credentials
Connecting to 'https://<removed>/'.
SonarQube request failed: Input string was not in a correct format. 
Connecting to SonarQube server: Failed

Have tried with both token and credentials and against two servers but the response is the same. The servers use ldap connections in the background.

With thanks for any help you can offer.


Hi @Will, thanks for reporting this issue to us.

May I ask what is your SonarLint version?

Based on the logs that you provided, it’s possible that we are unable to fetch the version of the SonarQube server.
Can you please help us check this, by making a GET request to https://<removed>/api/server/version, along with Authorization header set to Basic Authentication?
Please post the response that you get.

Hi Rita,

Thanks for the response.

It was the latest version of sonarlint installed from the sonarlint website yesterday

Because we build from source, the version is the snapshot. Parsing of the version was the cause as you suspected - removing this extra string and rebuilding successfully resolves this.


It does not occur with the released version from the website.




Great, I’m glad it works now :slightly_smiling_face: