I have been using the SonarQube plugin for a while, however it started reporting the warning MultipleGloalAnalyzerKeys for every project in my solution. As I wasn’t sure if this was due to something in my solution, I created a brand new Console application. I connected SonarQube to my company account and bound it to a project. However, as soon as I do this, and build the application I get the same warning with the message:
Multiple global analyzer config files set the same key ‘dotnet_remove_unnecessary_suppression_exclusions’ in section ‘Global Section’. It has been unset. Key was set by the following files: ‘C:\Users\my_account\AppData\Roaming\SonarLint for Visual Studio\suppression_exclusions.globalconfig, C:\Users\my_account\AppData\Roaming\SonarLint for Visual Studio\suppression_exclusions.globalconfig’
First, it is listing the same file twice, however if I check the folder, there is only a single copy of suppression_exclusions.globalconfig. Also, I made no other changes to the solution or to any files/folders in the “SonarList for Visual Studio” folder so not sure what global analyzers are causing the conflict as it only lists the one file twice. This is the same in the main solution where every project will have the same warning message listing this exact same file twice.
Finally, even if I unbind the solution from SonarQube, and try to rebuild the solution, I still get these warnings. The only way I have found to get rid of these warnings is to completely uninstall the SonarQube extension.
Any help/guidance would be appreciated on how to resolve this would be greatly appreciated.
System Specs
Operating system: Microsoft Windows 11 Enterprise N
Visual Studio version: Professional 2022 v17.14.27
SonarQube for Visual Studio plugin version: 9.8.0.16312
Hi, sorry, this is a recent change that we did to help fight false-positive cleanup of #pragma warning disable for our rules. I will look into fixing this tomorrow.
Workaround: if you delete that globalconfig file, it should no longer be included. The file is re-generated if you restart VisualStudio, unfortunately.
To help us understand what went wrong, can you explain what you’re seeing in more detail (is it a popup, error list error, etc.).
Also, you are not using multi-targeted projects, as you mentioned it’s reproducing even for empty template apps, right?
I see this error too, in Visual Studio 2022 with the SonarQube for Visual Studio 2022 extension version 9.8.0. It started happening a couple of hours ago.
For me, the error shows in the error list window: Multiple global analyzer config files set the same key ‘dotnet_remove_unnecessary_suppression_exclusions’ in section ‘Global Section’. It has been unset. Key was set by the following files: ‘C:\Users\\AppData\Roaming\SonarLint for Visual Studio\suppression_exclusions.globalconfig, C:\Users\\AppData\Roaming\SonarLint for Visual Studio\suppression_exclusions.globalconfig’
I checked the mentioned name and it contains the key only one time. So it apperas as if the config file itself is loaded twice.
At the moment I’m not sure why there’s an error in the first place. I cannot reproduce it, unfortunately.
For now you can try the workaround above or disable the extension if it’s too annoying.
I will release a rollback for this change tomorrow and will ping this thread again.
Though, this change is important for some of the other users of our extension, so I would like to have it fixed rather than just rolled back, and would appreciate any help with the investigation
It is a warning that is shown in the Build Output window: CSC : warning MultipleGlobalAnalyzerKeys: Multiple global analyzer config files set the same key ‘dotnet_remove_unnecessary_suppression_exclusions’ in section ‘Global Section’. It has been unset. Key was set by the following files: ‘C:\Users\User\AppData\Roaming\SonarLint for Visual Studio\suppression_exclusions.globalconfig, C:\Users\User\AppData\Roaming\SonarLint for Visual Studio\suppression_exclusions.globalconfig’
I can confirm this is occuring in projects that only target a single .NET version and in projects that target mulitple .NET versions.
Yes, this is reproducible for me if I simply create a .NET 8 Console application and don’t even make any changes to it. As soon as the extension runs, it outputs in the warnings in the list and build windows as other has stated. For my solution, which has multiple projects (all single .NET 8 targets), the warning will be outputted for each project; so in my case, I see it repeated 12 times.
Same issue here in .NET8 / .NET9 with VS 2026 18.3.2 - everytime Visual Studio is started the file is C:\Users\User\AppData\Roaming\SonarLint for Visual Studio\suppression_exclusions.globalconfig is modified.
Another workaround is to delete the section dotnet_remove_unnecessary_suppression_exclusions - even deleting it live will remove the warning on next builds.
I have both the extension and the analyzers installed as packages if that can be a lead.
I have other extensions that do roslyn static code analysing, so maybe there’s a conflict?
Hi. Could you please try this fixed version to validate that it doesn’t produce the warning anymore? Download the VSIX from build artifacts and install it (double click)
Which version are you running? 9.8.1.16415 release is disabling the feature (expected that there is no warning anymore) and 9.9.0.16418 test build enables the feature again (but hopefully should fix the warning)
Even with build 16418, I see the warning “CSC : warning MultipleGlobalAnalyzerKeys: Multiple global analyzer config files set the same key ‘dotnet_remove_unnecessary_suppression_exclusions’ in section ‘Global Section’. It has been unset. Key was set by the following files: ‘C:\Users\\AppData\Roaming\SonarLint for Visual Studio\suppression_exclusions.globalconfig, C:\Users\\AppData\Roaming\SonarLint for Visual Studio\suppression_exclusions.globalconfig’“
What I did: I closed Visual Studio 2022, installed the new vsix (without first uninstalling the 16415 version), started visual studio again and rebuilt the solution where I first noticed the error (I think it was an error then, but a warning now).