# How to globally exclude roslyn issues

**URL:** <https://community.sonarsource.com/t/how-to-globally-exclude-roslyn-issues/136727>\
**Category:** SonarQube Server / Community Build\
**Tags:** roslyn, csharp, sonarqube\
**Created:** [March 13, 2025, 10:08am UTC](https://community.sonarsource.com/t/how-to-globally-exclude-roslyn-issues/136727 "2025-03-13T10:08:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![faka](https://avatars.discourse-cdn.com/v4/letter/f/ee59a6/32.png) [@faka](https://community.sonarsource.com/u/faka)\
**Post date:** [March 13, 2025, 10:08am UTC](https://community.sonarsource.com/t/how-to-globally-exclude-roslyn-issues/136727/1 "2025-03-13T10:08:51Z")

</div>

I’ve been trying to figure out how we can exclude Roslyn issues globally but the only solution I’ve been able to find is to use the .editorconfig file to exclude them. Problem with that is, as far is I understand, this would have to be added per project. This also means everyone would be able to update this file, which I also don’t want.

We have a lot of projects and I’d like all of them to use the same rules.

I’ve tried adding the issues to the global sonarqube settings (Administration → Configuration → General settings → Analysis Scope) like this

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/2/8/287e48a406ad77db98891db474c4a9197a08b95d.png)  
but it looks like that’s completely ignored.  
I’ve also tried to add it on a specific project, just to test if the feature works at all for roslyn, but that seems to be completely ignored too.

Any suggestions on how I can best achieve my goal?

We’re using:

- SonarQube Developer edition deployed on k8s

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [March 14, 2025, 2:26pm UTC](https://community.sonarsource.com/t/how-to-globally-exclude-roslyn-issues/136727/2 "2025-03-14T14:26:07Z")

</div>

Hi,

Welcome to the community!

The exclusions you’re setting are meant for native rules.

There is [a way to do this](https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/importing-external-issues/external-analyzer-reports/#external-dotnet-issues), but unfortunately you’ll have to do it project-by-project in the analysis configuration.

&nbsp;  
HTH,  
Ann

---

<div class="post-metadata">

**Author:** ![faka](https://avatars.discourse-cdn.com/v4/letter/f/ee59a6/32.png) [@faka](https://community.sonarsource.com/u/faka)\
**Post date:** [March 14, 2025, 3:28pm UTC](https://community.sonarsource.com/t/how-to-globally-exclude-roslyn-issues/136727/4 "2025-03-14T15:28:12Z")

</div>

Is there no workaround to get this into 1 file or something? Because the biggest problem with this is keeping them all in sync.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [March 14, 2025, 3:51pm UTC](https://community.sonarsource.com/t/how-to-globally-exclude-roslyn-issues/136727/5 "2025-03-14T15:51:42Z")

</div>

Hi,

As I said, you’ll have to do it project-by-project.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![faka](https://avatars.discourse-cdn.com/v4/letter/f/ee59a6/32.png) [@faka](https://community.sonarsource.com/u/faka)\
**Post date:** [March 17, 2025, 8:01am UTC](https://community.sonarsource.com/t/how-to-globally-exclude-roslyn-issues/136727/6 "2025-03-17T08:01:06Z")

</div>

If I understand correctly, the page you linked only shows an option to ignore all roslyn issues or to categorize specific issues. I want to only exclude specific roslyn issues.  
Am I misunderstanding this?

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [March 17, 2025, 1:38pm UTC](https://community.sonarsource.com/t/how-to-globally-exclude-roslyn-issues/136727/7 "2025-03-17T13:38:36Z")

</div>

Hi,

No, you understand correctly. When you said you wanted to exclude them “globally” this is what I thought you meant.

If you want to pick and choose, then you’ll have to keep the rules from running at all. [This SO answer](https://stackoverflow.com/a/36461732/2662707) shows how to do that.

&nbsp;  
HTH,  
Ann
