Dotnet 6 MVC website only showing results for HTML/JS/CSS

ALM used:
Github

CI system used:
Github action

Languages of the repository:
C#, HTML, javascript

URL:
Git repo: https://github.com/tmatt95/new-mvc
Sonar dashboard: https://sonarcloud.io/summary/overall?id=tmatt95_new-mvc
Github action build file: https://github.com/tmatt95/new-mvc/blob/main/.github/workflows/build.yml
Github action logs: git-action-logs.txt (2.3 MB)

Error observed:
Only getting results for the HTML and not the C#.

Steps to reproduce:

  1. Create a new .net 6 MVC application using the following command:
    dotnet new mvc
  2. Push the changes to Version control.
  3. Create a new sonar cloud project pointing to the git repo.
  4. Add github actions file (link above)
  5. The code will scan the project. I can see the c# warnings in the logs but when I view the sonarcloud dashboard they are not there and the c# code pages looks like they have not been scanned.

Thanks in advance for your help. The Github link contains the result of running the dotnet new mvc command.

Hey there.

We’ve got you covered with a new release of the Scanner for .NET today!

It should already be available.

2 Likes

Hi Colin,
Thanks for the quick reply. Using the latest version of the sonar scanner msbuild has fixed the problem and I can now see my c# error messages in the sonar dashboard.

Matt

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.