I must admit, that I am sad to see that this is a necessity because of an assumption from SonarClouds side. I prefer the other way around; tell SonarCloud to only exclude those I have defined (in my case, all my test projects):
Anyway, I hope with this post and the references given, that SonarCloud will consider tweaking their engine.
I agree it’s not ideal – and I think the bigger question is: what condition is being fulfilled such that the projects are being categorized as test code? Your projects reference XUnit – is there a use-case where a non-test project (that should be covered by code) references XUnit that we aren’t thinking about?
The 3 projects in questions all extend the existing functionality of Xunit (and is also named as such), e.g. it could be that you are parsing reserved words that might or might not indicate a test project. But from my perspective, and the fact I have a strict folder structure, it simply should not be considered something to be excluded. However; good you provide an option to hint your engine.
That being said - and this is just my viewpoint - I think some confusion starts to arise with these different configurations.
Earlier - and this counts for all my test projects - I needed to include this in my project file: <SonarQubeExclude>true</SonarQubeExclude>, otherwise these would be considered code for testing.
Now you also have the <SonarQubeTestProject>false</SonarQubeTestProject> … I think there is an overlap.