I am using SonarCloud with Azure DevOps, I have set this exclusion in the Prepare Analysis Configuration step to sonar.exclusions=**/*.xml
The number of Xml lines included in the report has in fact dropped yet there are still a few large Xml files included. What I have noticed is that these remaining Xml files are all in the NUnit project, nevertheless the rule should have excluded them.
The nunit project you have as been categorized as a test project (this is the expected behavior), so anything you would exclude from test project/files should be added in this property :
sonar.test.exclusions
Can you give it a try and tell me how it went ?
You can read more about these properties in that documentation :