# Binding multiple projects and nested projects

**URL:** <https://community.sonarsource.com/t/binding-multiple-projects-and-nested-projects/135271>\
**Category:** VS Code\
**Created:** [February 15, 2025, 6:30pm UTC](https://community.sonarsource.com/t/binding-multiple-projects-and-nested-projects/135271 "2025-02-15T18:30:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![trucdg](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/trucdg/32/66895_2.png) [@trucdg](https://community.sonarsource.com/u/trucdg)\
**Post date:** [February 15, 2025, 6:30pm UTC](https://community.sonarsource.com/t/binding-multiple-projects-and-nested-projects/135271/1 "2025-02-15T18:30:26Z")

</div>

Please provide

- Operating system: MacOS Sequoia 15.3
- Visual Studio version: 1.97.0
- SonarQube for Visual Studio plugin version: 4.15.0
- Programming language you’re coding in: Python
- Is connected mode used: Yes
  - SonarQube Cloud

And a thorough description of the problem / question:  
I wonder how I can bind multiple projects with SonarQube for IDE with VSCode. Here is my case: I have a project directory, called project-A (which is a github repository that binds with project-A on SonarCloud). Inside project-A, I also have a separate project, called project-B (another github repository that binds with project-B on SonarCloud).  
If I want to bind project-A directory with project-A on SonarCloud, and project-B directory with project-B on SonarCloud in my VSCode, how can I do that? I’m only allowed to create 1 connection when clicking “Add SonarQube Cloud Connection”. Thus, I can’t create 2 different connectionIds for 2 projects.  
I have tried:

```auto
project-A/
--.vscode/settings.json
--projectB/
  --.vscode/settings.json

```

and the content of the settings.json

```auto
// In project-A/.vscode/settings.json
{
    "sonarlint.connectedMode.project": {
        "connectionId": "mySonar",
        "projectKey": "project-A-key"
    }
}

// In project-B/.vscode/settings.json
{
    "sonarlint.connectedMode.project": {
        "connectionId": "mySonar", // I can't create another connectionId for the nested project via VSCode
        "projectKey": "project-B-key"
    }
}

```

Please give me some guidance on this or let me know if this is possible. Thank you!

---

<div class="post-metadata">

**Author:** ![JBL\_SonarSource](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/jbl_sonarsource/32/64_2.png) [@JBL\_SonarSource](https://community.sonarsource.com/u/JBL_SonarSource)\
**Post date:** [February 17, 2025, 8:54am UTC](https://community.sonarsource.com/t/binding-multiple-projects-and-nested-projects/135271/4 "2025-02-17T08:54:16Z")

</div>

Hello, welcome to the community! And thank you for asking.

I would recommend creating a [multi-root workspace](https://code.visualstudio.com/docs/editor/workspaces/multi-root-workspaces).

You can start with your current `project-A` folder open, then use `File > Add Folder to Workspace...` to add `project-B` as a separate workspace folder.

You can then use `File > Save Workspace As...` to save this workspace layout and have it automatically reopened the next time you start the IDE.

This way, each workspace folder is seen by the IDE as a separate configuration scope, and each can be bound to a different project on SQ:Cloud.
