Bind multiple sonar cloud projects to solution

  • Operating system: Windows 11
  • Visual Studio version: Microsoft Visual Studio Professional 2022 (64-bit) - Current
    Version 17.8.7
  • SonarLint plugin version: 7.8.0.88494
  • Programming language you’re coding in: C#
  • Is connected mode used:
  • Connected to SonarCloud or SonarQube (and which version):Sonar Cloud

I have multiple projects in solution, but I can bind only one Sonar Cloud project. How to bind multiple Sonar Cloud projects? If I bind some other project, current bounded project is unbounded.

Hi Željko,

Welcome to the community.

For these projects do you use different credentials or the same one?

Best,
Uğraş

The same one.

Hi Željko,

I am not exactly clear on the scenario. Do you want to connect the same solution to two different SonarCloud projects, or did I misunderstand? If the former, we do not support it, and if the latter, could you please explain the scenario in detail?

Yes, I have one solution with multiple projects. Each project should bind its own Sonar Cloud project. Credentials are the same for all Sonar Cloud projects.

Hi,
In the .Net world, the equivalent of an SC project is a Solution. Our analyzers also expect a solution per SC project. Your use case is not the intended use of SC, and in SonarLint, we do not support binding VS projects to SC Projects but only binding Solutions.

Thanks for clarification. So workaround is to open each VS project in separate VS solution? I hope you will support binding of VS project to SC project in the future.

Yes, that would be a reasonable workaround. If you want to suggest this feature you could use Product Manager for a Day section of our forums.