I have a C # / project. NET, which I want to scan with SonarQube (C # language).
I get a scan, but with many errors (over 200 repeated errors)
Provide an 'AssemblyVersion' attribute for this assembly.
This message above is repeated many times and takes into account most of the SonarQube errors that I see in my report.
SonarQube Properties File
# Comma-separated paths to directories with sources (required)
I even ran this msbuild (using MSBuild.exe Version 14, which I downloaded from https://www.microsoft.com/en-us/download/details.aspx?id=48159 ) batch file in my project
C:\Users\pwrdbyadmin\Desktop\sonar-scanner-msbuild-3.0.2.656\SonarQube.Scanner.MSBuild.exe begin /k:"org.sonarqube:sonarqube-scanner-msbuild" /n:"ProjectName" /v:"1.0" "C:\Program Files (x86)\MSBuild\14.0\Bin\amd64\MSBuild.exe" /t:Rebuild C:\Users\pwrdbyadmin\Desktop\sonar-scanner-msbuild-3.0.2.656\SonarQube.Scanner.MSBuild.exe end
Loaded SonarQube 6.5 and ran the following command to start the server
C:\Users\pwrdbyadmin\Desktop\sonarqube-6.5\bin\windows-x86-32\StartSonar.bat
Team running from project
C:\Users\username\Desktop\sonar-scanner-3.0.3.778-windows\bin\sonar-scanner.bat
I still cannot resolve many of the .NET errors in my project.
How can I fix these obvious C # errors that occur after running SonarQube in my project, do I need Visual Studio, do I need to create my own project in Visual Studio? What are the necessary steps to scan my project?
EDIT
The new three liners allowed the analysis to work without any error. There is not enough privilege that appears at the end. I used the latest MSBuild.exe VS 2017 in my 3 line command
C:\Users\<UserName>\Desktop\sonar-scanner-msbuild-3.0.2.656\SonarQube.Scanner.MSBuild.exe begin /d:"sonar.host.url=http://localhost:9000" /d:"sonar.login=<login>" /d:"sonar.password=<password>" /k:"org.sonarqube:sonarqube-scanner-msbuild" /n:"<ProjectName>" /v:"1.0" "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" /t:Rebuild C:\Users\<UserName>\Desktop\sonar-scanner-msbuild-3.0.2.656\SonarQube.Scanner.MSBuild.exe end /d:"sonar.login=<login>" /d:"sonar.password=<password>"
Despite using an updated sequence of commands, I still get build version errors in my report.
Do I need to delete the project and reanalyze. In addition, I even thought that my 3-line display shows that MSBuild 15 is in use, a yellow notification appears that I am using MSBuild 12. I'm not sure why.
UPDATE: Screenshot of duplicate files / folders in code smell analysis.
