SonarQube for Visual Studio 2022 - error connecting to server

Please provide

  • Operating system: Windows 10 Enterprise (x64) 20H2
  • Visual Studio version: Enterprise 2022 - Version 17.12.5
  • SonarQube for Visual Studio plugin version: 8.11.0.11944
  • Programming language you’re coding in: C#
  • Is connected mode used: SonarQube Community Build
    • SonarQube Cloud, SonarQube Server, or SonarQube Community Build? (if one of the latter two, which version?):Community Build v25.2.0.102705

And a thorough description of the problem / question: I am doing an initial evaluation of SonarQube using the Community Build. I am running the community build using the downloaded Docker Container from your website.

I was able to create a project and analyze it using the local option within SonarQube Server.
I then tried to connect the Visual Studio plugin using Manage Connections on the Bind to SonarQube menu option.

I select SonarQube Server and enter the URL http:localhost:9000, then click next, then click Generate Token. This takes me to the server to generate my token. I select “User Token” in the drop down and click Generate. This generates my token. I then copy that token into the plugin window and click OK. It then give me a “Creating a connection failed” error.

I have done this many times now and read all your prior support topics and still can’t figure it out.
I have turned on verbose logging. The following is what is displayed in the logs.

[ThreadId 1] [SharedBindingConfigProvider] The .sonarlint shared folder was not found
[DEBUG] [ThreadId 126] [SLCore] [sonarlint > SonarLint Server RPC request executor] GET 200 http://localhost:9000/api/system/status | response time=21ms
[DEBUG] [ThreadId 126] [SLCore] [sonarlint > SonarLint Server RPC request executor] Downloaded server infos in 22ms
[DEBUG] [ThreadId 112] [SLCore] [sonarlint > SonarLint Server RPC request executor] GET 200 http://localhost:9000/api/system/status | response time=27ms
[DEBUG] [ThreadId 112] [SLCore] [sonarlint > SonarLint Server RPC request executor] Downloaded server infos in 27ms
[DEBUG] [ThreadId 89] [SLCore] [sonarlint > SonarLint Server RPC request executor] GET 200 http://localhost:9000/api/authentication/validate?format=json | response time=13ms
[ThreadId 1] Failed to write credentials, Win32ErrorCode: 1312. See Tutorial - Debug system error codes - Win32 apps | Microsoft Learn for more information.
[ThreadId 1] Failed adding server connection: Failed to write credentials
[ThreadId 1] [SharedBindingConfigProvider] The .sonarlint shared folder was not found

Also, this solution is using TFVC, not Git for source control.

Hi,

Welcome to the community!

I suspect this is the root cause:

The penultimate error is “Failed to write credentials” followed again by that “not found”. I think the credential write failed because the place it was supposed to be written was the .sonarlint shared folder.

So… are there any earlier errors or warnings in your log that might indicate what the problem with the .sonarlint folder is?

 
Thx,
Ann

A post was split to a new topic: The .sonarlint shared folder was not found

Hi @Jamesj

Are you using a remote development environment (RDP) or running VisualStudio under Impersonation? Or with Administrator rights using cloud authentication provider?

Could you check that the Network access: Do not allow storage of passwords and credentials for network authentication policy is disabled?