Must-share information (formatted with Markdown):
- latest versions of sonarqube hosted on local vm
- Build and run unit tests on local vm to get sonarqube analyses and code coverage. Running on deployment agent instead of build agent as the unit tests still rely on a DB.
- I have the Prepare analyses step before the Visual Studio build and VSTest steps in the release pipeline. Two artifacts are included, _Artifact1 and _Artifact2
When I try to use Integrate with MSBuild option it complains
Unhandled Exception:
System.ArgumentNullException: Value cannot be null.
Parameter name: path
at System.IO.Directory.GetDirectories(String path, String searchPattern, SearchOption searchOption)
at SonarScanner.MSBuild.TFS.TrxFileReader.FindTrxFiles(String buildRootDirectory, Boolean shouldLog)
at SonarScanner.MSBuild.TFS.BuildVNextCoverageReportProcessor.TryGetTrxFiles(AnalysisConfig config, ITeamBuildSettings settings, IEnumerable`1& trxFilePaths)
at SonarScanner.MSBuild.TFS.CoverageReportProcessorBase.ProcessCoverageReports()
at SonarScanner.MSBuild.PostProcessor.MSBuildPostProcessor.Execute(String[] args, AnalysisConfig config, ITeamBuildSettings settings)
at SonarScanner.MSBuild.BootstrapperClass.PostProcess()
at SonarScanner.MSBuild.BootstrapperClass.Execute()
at SonarScanner.MSBuild.Program.Execute(String[] args, ILogger logger)
at SonarScanner.MSBuild.Program.Main(String[] args)
The process 'C:\azagent\A1\_work\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.11.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe' failed with exit code 3762504530
seems to be related to sonar.sources because when I choose “use standalone scanner” and fill in the root directory param it works (though it fails with a different error related to typescript version)
Also my project is mixed .Net (C#) and Angular.
The code that is compiled is in _Artifact1, _Artifact2 is the compiled tests and DB scripts.
Thanks and regards