Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9312197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T01:34:06+00:00 2026-06-19T01:34:06+00:00

I prepared Sonar for analizing my C# project. I installed sonar and sonar-runner and

  • 0

I prepared Sonar for analizing my C# project. I installed sonar and sonar-runner and also configured the C# plugins (.NET Core, C# Core, FxCop, Gendarme, Gallio, OpenCover and StyleCop)

So far everythings works fine. In Sonar I see my code statistics (LOCs and so on) and I also see the code violations. There is no code coverage buts thats ok because I do not have any tests.

The problem is that I only see violations regarding Stylecop, so it just shows some code style problems. But I am sure that my application also must have other violations that should be detected by FxCop and the other plugins.

In this picture one can just see that it shows a violation from StyleCop. All my violations are ONLY from StyleCop.

enter image description here

In the Sonar C# Documentation I have read that it can happen that Analysis succeeds but too few violations were found, maybe because of the wrong assambly direction.
I show you my sonar-runner.properties, maybe here is the cause of my problems:

#----- Default Sonar server
#sonar.host.url=http://localhost:9000

#----- PostgreSQL
#sonar.jdbc.url=jdbc:postgresql://localhost/sonar
#sonar.jdbc.driver=org.postgresql.Driver

#----- MySQL
#sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
#sonar.jdbc.driver=com.mysql.jdbc.Driver

#----- Oracle
#sonar.jdbc.url=jdbc:oracle:thin:@localhost/XE
#sonar.jdbc.driver=oracle.jdbc.driver.OracleDriver

#----- Global database settings
#sonar.jdbc.username=sonar
#sonar.jdbc.password=sonar

#----- Default directory layout
sonar.sources=src
sonar.tests=src
sonar.binaries=src

#----- Default source code encoding
#sonar.sourceEncoding=UTF-8

I also want to list my application structure:

-->ProjectMainFolder
   -->Project.sln
   -->sonar-project.properties

   -->Project1Folder
       -->bin
       -->object
       -->Properties
       -->Project1.csproj
       -->Project1Main.cs

   -->Project2Folder
       -->bin
       -->object
       -->Properties
       -->Project2.csproj
       -->Project2Main.cs

So the question again:
Why do I only see StyleCop violations and no violation from FxCop, Gendarme and so on?

I also want to add my sonar-project.properties:

# optional description
sonar.projectDescription=Project description

# Project identification  
sonar.projectKey=Vendor:Project
sonar.projectVersion= 1.0
sonar.projectName= Project 

# Info required for Sonar  
sources=.
sonar.language=cs
sonar.sourceEncoding=UTF-8

#Core C# Settings  
sonar.dotnet.visualstudio.solution.file=Project.sln
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T01:34:08+00:00Added an answer on June 19, 2026 at 1:34 am
    • First you should not put project specific settings in the sonar-runner.properties file, you should create a “sonar-project.properties” file inside your solution and keep it there

    • Second, in this “sonar-project.properties” file, “sonar.sources” should be set to “.” and you shouldn’t have “sonar.tests” nor “sonar.binaries”

    All this is well explained in the documentation and applied in the sample project.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had prepared a project on making a software application. It is complete and
I prepared something for you on jFiddle http://jsfiddle.net/jJyXe/1/ I have to different series. I
I prepared a wcf service host and configured with some binding information below. <system.serviceModel>
I prepared a jsfiddle example: http://jsfiddle.net/PEH7t/11/ The problem is that I have a container
I prepared an MSI project of my app and added a custom action in
I prepared a little fiddle and boiled it down to the minimum: http://jsfiddle.net/lpeterse/NdhjD/4/ <script
The prepared query returns the following resultset, when $this->show is set to saved-by-the-bell :
I prepared a WLST script that prints all sever names from WebLogic cluster to
I am fully prepared to admit that I am missing something simple here. I
this is my textarea prepared for ckeditor to launch on: <textarea name=Message id=RFMessage lol

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.