Hello, I am trying to get my dot net core code analised and sent to sonarCloud. Everything seems to runs smoothly but sonarCloud keeps showing no data:
SonarScanner for MSBuild 4.6.2
Using the .NET Core version of the Scanner for MSBuild
WARNING: Please specify the command 'begin' or 'end' to indicate whether pre- or post-processing is required. These parameters will become mandatory in a later release.
Pre-processing started.
Preparing working directories...
22:34:03.145 Updating build integration targets...
22:34:03.439 Fetching analysis configuration settings...
22:34:26.485 Provisioning analyzer assemblies for cs...
22:34:26.488 Installing required Roslyn analyzers...
22:34:32.45 Provisioning analyzer assemblies for vbnet...
22:34:32.452 Installing required Roslyn analyzers...
22:34:32.583 Pre-processing succeeded.
What else do I need to run in order to the report data on SonarCloud?
Thanks
The .NET Core version can also be used as a .NET Core Global Tool. After installing the Scanner as a global tool as described above it can be invoked as follows:
dotnet sonarscanner begin /k:"project-key"
dotnet build <path to solution.sln>
dotnet sonarscanner end
Same as above, if you are targetting a SonarCloud project, will have to add both the organization and a login for authentication.
@Felipe thanks for point that out. After struggling a little I was finally able to get it working. However, there are two things I still need help getting coverage sorted.
We have many different, independent test projects that we get our coverage using https://github.com/tonerdo/coverlet - How do I tell sonarscanner where the different coverage.json files are? Is it capable of merging them together?