0

Trying to use Sonarqube for the first time. It says it can work online wihtout downloading the server. So I run the below command but got hundreds of errors about not recognizing the C# 6 syntax. What should I do?

SonarQube.Scanner.MSBuild.exe begin /k:"myprokject" /d:"sonar.host.url=https://sonarqube.com" /d:"sonar.login=xxxxxxxxxxx"

MsBuild.exe /t:Rebuild

SonarQube.Scanner.MSBuild.exe end /d:"sonar.login=xxxxxxxxxxxxxxx"
François
  • 3,164
  • 25
  • 58
  • Can you please add the logs? – Fabrice - SonarSource Team Mar 02 '17 at 09:01
  • I see 5 logs: access, ce, es, sonar and web. Which one do you want to see? None shows error. I see errors on the console for each line where I use a C# 6 syntax (say MyMethod() => myResult). – François Mar 02 '17 at 09:20
  • try executing `C:\>where msbuild.exe` from the same command prompt. The result should be something like: `C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe`. I would guess your version is different, hence the compiler does not understand C# 6 features. A possible reason could be using the Developer Command Prompt from older version of Visual Studio... I think this answer should be of help: http://stackoverflow.com/a/32008030/7156760 – Val Mar 02 '17 at 12:24
  • I don't know where MsBuild is "pointing" as I don't see it in my path environment variable. However, now I specifically call the one in version 14.0 and now get error about my PCL profile framework not being references in my project.json (I don't have a project.json...). But I guess that should be another question. – François Mar 17 '17 at 07:43

0 Answers0