Sonar Coverage is not complete for MSBuild .Net Framework

I’m trying to generate a Sonar Coverage for a solution with multiple projects but it doesn’t show coverage for all the projects that have unit test, only shows for one folder coverage and not for the rest.

I’m running:

  • SonarQube 7.7
  • SonarScanner for MSBuild 4.6.2 (Using the .NET Framework version of the Scanner for MSBuild)
  • No extra installation

Here is the script that I’m executing:
*\SonarScanner.MSBuild.exe begin /k:“PROJECT” /n:“PROJECT” /d:sonar.cs.opencover.reportsPaths=TestResult.xml *

MSBuild.exe PROJECT.sln /t:rebuild

*"\OpenCover.Console.exe" “-output:TestResult.xml” -register:user -target:".nuget\packages\nunit.consolerunner\3.6.1\tools\nunit3-console.exe" -targetargs:"/project.Business.Tests.dll /project.Connector.Tests.dll /project.Services.Tests.dll /project.Web.Tests.dll" *

\SonarScanner.MSBuild.exe end

For the projects with .Net Core the script works fine and shows coverage for all the project, but I have been trying to generate the coverage for this .Net Framework solution and got no results.
The projects are C# code.