Asmita
Asmita

Reputation: 21

C# code using sonar

I am using .net framework 4.6.2 and visual studio 2015.I have written sample c# project and tried analyzing with sonar, I am able to run sonarqube successfully but after that in sonar server the result is empty. find below detail description of what I have done:

  1. Downloaded and installed sonarqube and kept in
    C:\Softwares\sonarqube-6.7.4
  2. Downloaded and installed scanner ,
    C:\Softwares\sonar-scanner-cli-3.2.0
  3. Added the path variable value in Environment variable as :C:\Softwares\sonar-scanner-cli-3.2.0\bin
  4. Then run the start sonar command
    from:C:\Softwares\sonarqube-6.7.4\bin\windows-x86-64 which shows
    process is up, SonarQube is up .
  5. My sample solution path is :
    C:\Softwares\c# sample\sample Also added sonar-project file in the
    same path which contains project details such as path, key ,port,
    version, language.
  6. In the cmd window reach out to the solution path and hit sonar-scanner command

which shows Execution Success after checking http://localhost:9000/projects?sort=-analysis_date shows zero bugs,zero Vulnerabilities and 0 code smells with passed solution name.

Can someone have an idea what is wrong or missing in this ? adding the screenshot of cmd prompt

sonar-qube sonar scanner

Thanks,

Upvotes: 0

Views: 2904

Answers (1)

duncanp
duncanp

Reputation: 1580

You need to use the Scanner for MSBuild to analyze C# (or VB.NET), not the Scanner CLI. The documentation is here.

Upvotes: 1

Related Questions