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.
App.sln --App.csproj --SharedLibrary.csproj Website.sln --Website.csproj --SharedLibrary.csproj
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
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:
/.sonarlint /app/App.sln /website/Website.sln /shared/SharedLibrary.csproj
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)