SONARDOTNT-382

Fix for SONARDOTNT-382

There are unfortunately 3 commits in this one. The only one related to SONARDOTNT-382 is 
https://github.com/peterstevens130561/sonar-dotnet/commit/c75433ecc3d28cca8ff166deed2a3edce41db274