VB.Net - SonarQube Community Edition v8.0 - no code coverage stats and encoding issues

Using the vanilla SonarQube community edition to analyze our VB.Net solution. Results show 0.0% code coverage stats and encoding issues. I was wondering if anyone else has experienced this and was able to fix it to analyze their solution correctly.

Using MSBuild 4.7.1 and SonarScanner. No plugins (at least, I’ve not changed anything from the ‘get started in 2 minutes’ method for Community Edition).

Getting a bunch of these when running SonarScanner.MSBuild.exe end:

WARN: Encoding detected by Roslyn and encoding used by SonarQube do not match for file C:\path\to\my\filename.aspx.vb. SonarQube encoding is ‘UTF-8’, Roslyn encoding is ‘windows-1252’. File will be skipped.

And a bunch of these:

WARN: Invalid character encountered in file C:/path\to\my\otherfilename.aspx.vb at line 786 for encoding UTF-8. Please fix file content or configure the encoding to be used using property ‘sonar.sourceEncoding’.

Any suggestions/input would be greatly appreciated.

Hi @justin.gatewood,

Did you chek how to enable coverage import: [Coverage & Test Data] Generate Reports for C#, VB.net ?

I did look at that post. The problem I am running into is that vstest.console.exe cannot find “UnitTestProject1\bin\Debug\UnitTestProject1.dll” (says it does not exist, which is true). I’ve not done unit testing before, and it appears this UnitTestProject1 folder is a required aspect in order for code coverage to work.

Hi @justin.gatewood,

I would invite you to get coverage working before trying to import it into SonarQube.