Support including .csproj in multiple .sln files [Visual Studio] [SonarLint]

Our team uses multiple Visual Studio .sln files, and several of those .sln files include the same .csproj project file, with the result being that the .csproj file is included in multiple different .sln files.

For example:



SonarLint doesn’t currently support this, so when we bind App.sln to our SonarQube project and then try to also bind Website.sln, we get an error.

My feature request is that SonarLint for Visual Studio support this :slightly_smiling_face:

Additionally, I think it would be great if SonarLint supported having the .sonarlint directory be outside of the solution directory. Ideally, our above setup would look something like this, with the projects in App.sln and Website.sln referencing the same top-level .sonarlint directory:


Thanks! :slightly_smiling_face:

Additional details

When we bind App.sln to our SonarQube project, everything goes smoothly. However, when we then try to bind Website.sln to our SonarQube project, we get an error that says this:

Unexpected error during workflow execution: Failed to bind project '....\Website\SharedLibrary.csproj'.
A conflicting version of SonarLint.xml has been found. Please delete the file '....\App\.sonarlint\....\CSharp\SonarLint.xml' and remove references to it from your projects, then re-open the solution and try again..

@rita.g posted a workaround on GitHub, but I think the nature of the workaround means that any projects that are included in multiple solution files won’t be able to sync their issues list with the SonarQube installation (so if we mark an issue as “wont fix” in SonarQube, it won’t be reflected in Visual Studio)

After some more discussion with Rita G., I’ve worked around this issue. However, the workaround was kind of painful, so I still think it’d be great if this was supported natively :slightly_smiling_face:

Hello @Bosch-Eli-Black,
good to hear the workaround suggested by @rita.g actually solves the issue for you.
Moreover, we started tracking your feature request; as of today we do not have any other Visual Studio users asking for it, so it is quite low in our priority list, but we constantly re-evaluate our priorities and roadmap based, among others, on community requests and votes; thus we may give more priority to this feature request if we start to see interest building around it.

Thanks, @Marco_Comi :slight_smile:

Is there a Jira ticket that corresponds with this, so that I can follow that ticket as well?

Hi @Bosch-Eli-Black,
in facts in SonarSource we are currently reviewing the tooling and the processes we use internally to track and prioritise feature requests; as consequence I cannot share a Jira link today, but be reassured - we are definitely tracking this request. In the meantime, let’s use this thread to see if there are feedbacks or votes from more community users.

1 Like

Okay. Thanks, @Marco_Comi :slight_smile: