Connected mode setup
Setting up connected mode and sharing your connection with your team is the easiest way to get started with using the Sonar Solution to bring SonarQube's AI capabilities into your IDE.
Connection setup
SonarQube for Visual Studio provides a connection wizard to help you set up Connected mode with SonarQube (Server, Cloud) or SonarQube Community Build. From version 7.4, you can share a setup configuration file with your team, simplifying the process.
Automatic setup with SonarQube Server
SonarQube Server and SonarQube Community Build offer the easiest way to set up connected mode: simply use the Opening issues in the IDE feature from SonarQube Server or SonarQube Community Build. You must trust the server to store a token for the connection, and it’s best if you already have the project open in your IDE.
If something doesn’t work, check the Troubleshooting connected mode setup, or follow the instructions below to manually create a SonarQube connection.
Create a new SonarQube Connection
Open the SonarQube Manage Project Binding wizard in Visual Studio by navigating to Extensions > SonarQube for Visual Studio > Connected Mode > Bind to SonarQube (Server, Cloud)…. The current Binding Status will be shown. Next, select Manage Connections to open a list of your Existing Connections and choose New Connection to create a new connection.
Choose SonarQube Server as your connection type, enter your SonarQube Server URL, and select Next to continue. The server URL is the same if you’re using SonarQube Community Build.

Lastly, enter your user token.
To generate a new user token, navigate to User > My Account > Security in SonarQube Server or simply use the Generate hyperlink to open the page in SonarQube Server, which will use the URL you provided earlier. If or when your user token expires, SonarQube for Visual Studio will show you a warning icon in the Manage Connections window.
The final steps involve binding your local project to the project on the server. See below for more details.
First-time connection setup for shared binding
One team member must step through the first-time setup process, then export and commit the binding configuration to the repository. Any team member who opens the project while running SonarQube for IDE will automatically receive a notification to bind the project. Each team member must use their own project credentials and SonarQube for IDE will use the binding details found in the configuration file to complete the connection.
To begin, one person from the team must follow the steps outlined in Using the connection wizard and Configure your binding, then follow the Save and share your setup instructions below to save the project configuration for the rest of the team.
Bind using shared configuration
Once one team member has saved the shared project configuration, additional team members will have a streamlined process when configuring their project binding. To achieve this, SonarQube for Visual Studio automatically looks for the .sonarlint folder; if it’s available and the shared configuration file is there, SonarQube for Visual Studio will offer you a gold bar to streamline the setup.

Select the Bind option from the gold bar to continue setting up your connection to the server using the shared settings. If you already have a connection to the correct server, the binding will start automatically.
If you don’t already have a connection, you will receive a notification. In this case, select OK on the notification and select Manage Connections from the Manage Project Binding wizard to manually create a connection. In the Manage Connections window, step through the connection setup by selecting either SonarQube Server or SonarQube Cloud to add your user token, as it is described above in Connection setup.
If you wish to opt out of using the shared connection settings and select Don’t show this again, the gold bar will no longer appear. To accept a shared configuration, select the Use Shared Configuration option from the Manage Project Binding window.
Sharing configurations between different IDEs
SonarQube for IDE extensions are available for IntelliJ (and other Jet Brains IDEs), Visual Studio, VS Code, and Eclipse. Although the information stored in the shared configuration file is the same, each extension might export the JSON file to a slightly different location depending on IDE and project type. This may cause friction when opening a configuration in an IDE other than the IDE that created it.
If SonarQube for IDE does not send you a notification to accept a shared configuration, please check first if you have opened your project’s root. If SonarQube for IDE still does not suggest a matching configuration, you must configure binding manually. Please see the Configure your binding collapsible above for instructions.
SonarQube for Visual Studio does not support generic connections. The file name of the shared configuration JSON file must match the currently opened solution name when binding a solution, or the currently opened folder name when binding a folder (for example, in a CMake project).
Project binding
When you bind a project, SonarQube for Visual Studio uses the Quality Profile defined on the server to decide which rules to run locally, and which rule parameters to use. When you mark a particular issue as "safe" or "won’t fix" on the server, the corresponding issue will be ignored in the IDE. Check these pages for details about managing your quality profile:
Managing quality gates in SonarQube Server.
Managing quality gates in SonarQube Cloud.
Synchronization with the server
The local connected mode configuration files can sometimes get out of step with settings on the SonarQube (Server, Cloud) or SonarQube Community Build servers for example, when a quality profile for the project is changed (on the server).
Synchronization between SonarQube Server and SonarQube for Visual Studio is almost instantaneous. For example, when changes are made to the quality profile, SonarQube Server sends SonarQube for Visual Studio an event notice; with SonarQube Cloud, SonarQube for Visual Studio checks the SonarQube Cloud server every ten minutes to listen for changes.
Unbinding a project
To unbind your project from SonarQube Server or SonarQube Cloud, navigate to Extensions > SonarQube > Connected Mode > Manage Binding to open the Manage Project Binding window, and select Unbind.
It’s very easy to rebind the project if you’ve already set up a shared configuration. See the Bind using shared configuration article above for more details.
Updating your credentials
From SonarLint for Visual Studio version 8.7, you can edit your authentication details in the SonarQube for Visual Studio UI.
Open the SonarLint Manage Project Binding wizard (Extensions > SonarQube > Connected Mode > Bind to SonarQube (Server, Cloud)…, and select Manage Connections. There, you can select the pencil to edit your connection.

SonarQube for IDE-SonarQube Server version support policy
SonarQube for IDE enables users to establish a connection to the latest SonarQube Server version and to the latest LTA (Long-Term Active) version. When a new LTA version is released, we still enable connecting SonarQube for IDE to the previous LTA version for a certain period of time (currently 9 months after the latest LTA release) to allow enough time for organizations to update their SonarQube Server version.
For more information about long-term support of SonarQube Server, check out our page describing the SonarQube Server Release cycle model. Review your SonarQube for IDE-specific requirements for version-to-version differences.
The 8.9LTA reached its support expiration date (in November ’23).
Legacy connected mode
Before SonarLint for Visual Studio version 7.0 (released in June 2023), connected mode behaved a bit differently. Please see the Previous versions page for the important details.
In addition, the process of setting up connected mode in versions 8.3 and earlier looks a bit different; all of this content was moved to the Legacy connected mode article on the Previous versions page.
Last updated
Was this helpful?