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.
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.
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.
I added sonar-project.properties at the root directory. As I had 2 separate workflows one for dotnet project and other for C++ project. After checkout I added rm sonar-project.properties before running dotnet scanner and it worked. Now, both the workflows are working as expected.