Error when Sonarscanner in CI running analysis for both Dotnet and Typescript

I am using SonarCloud and doing CI analysis for my project which has Dotnet as backend and Typescript as frontend.
I have 2 separate github actions file for both. Dotnet was working and then I added the typescript one. for this requirement was to create a sonar-project.properties file containing the sonar.projectKey and sonar.organization for typescript github actions to work. But this is not required for dotnet github actions. Due to which the dotnet github actions is failing with below error. How to resolve this by running both dotnet and typescript workflows ?

  • ALM used (GitHub)
  • CI system used (GitHub Actions)
  • Languages of the repository - Dotnet, Typescript
  • Error observed:
04:44:00.556  sonar-project.properties files are not understood by the SonarScanner for MSBuild.

Hey there!

If you want everything analyzed under 1 SonarQube Cloud project, you’ll need to use the SonarScanner for .NET. There are two ways to make sure your Typescript frontend gets analyzed as a part of that analysis.

There are two options:

In all cases, when you use the SonarScanner for .NET, you cannot define properties in a sonar-project.properties file and you must remove it from your repo.