SonarSource / sonar-dotnet

Code analyzer for C# and VB.NET projects
https://redirect.sonarsource.com/plugins/csharp.html
GNU Lesser General Public License v3.0
790 stars 227 forks source link

C# files not being analysed #2824

Closed nbhele closed 4 years ago

nbhele commented 4 years ago

Hello. SonarScanner works without errors. Only warning:

Property missing: 'sonar.cs.analyzer.projectOutPaths'. No protobuf files will be loaded for this project. But in Sonarqube code has not been analysed.

Repro steps

Please provide the steps required to reproduce the problem

SonarScanner.MSBuild.exe begin /k:"codered-redalerts"

"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe" "C:\DEV\RedAlerts\RedAlerts.sln" /t:Rebuild

SonarScanner.MSBuild.exe end

If possible then please create a git repository with a repro sample or attach a zip to the issue.

Expected behavior

should analyze C# files as well

Actual behavior

C# code has not been analyzed. showing no c# code lines

Known workarounds

no idea

Related information

Visual Studio Version 2017 MSBuild 15.9.5 SonarScanner for MSBuild 4.6.0

nbhele commented 4 years ago

Hi @andrei-epure-sonarsource I read your response on a similar issue. can you help me here?

andrei-epure-sonarsource commented 4 years ago

hi @nbhele

nbhele commented 4 years ago

@andrei-epure-sonarsource Thank you for responding!!

  1. I am not running commands from the repository folder where sln file is stored. I am running it from a different folder 'sonarqube' after downloading it and referred https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-msbuild/ to install and use it
  2. Log level - Debug SonarQube_end_and_begin_Logs_30Nov.txt
  3. SonarAnalyzer.CSharp Version= 8.0.0.9566
  4. SonarQube version - 4.6.0 (MSBuild.SonarQube.Runner.Tool&version=4.6.0)
andrei-epure-sonarsource commented 4 years ago

sorry for the delay - did this get fixed?

you should run the commands from the folder with the solution

I am closing this issue as it is not related to something we can fix on sonar-dotnet

regarding help to use our products, please open a topic on our Community Forum, under the Get Help category - https://community.sonarsource.com/c/help/8