title: Analyze c# code with sonarQube: MSBUILD version problems
body: <p>I need to analyze various C# files  (not a project, just .cs files put under the same directory). </p>
  
  <p>I tried the analysis in 2 different ways and I have errors in each of it. Could someone help solve any of those errors?</p>
  
  <p>1- I tried the analysis like mentioned <a href="https://docs.sonarqube.org/display/SONAR/Get+Started+in+Two+Minutes" rel="nofollow noreferrer">here</a> </p>
  
  <p>By executing C:\sonar-scanner\bin\sonar-scanner.bat  in the root file, I have this error</p>
  
  <pre><code>ERROR: Error during SonarQube Scanner execution
  java.lang.IllegalArgumentException: Custom and 3rd party Roslyn analyzers 
  are only by MSBuild 14. Either use MSBuild 14, or disable the custom/3rd 
  party Roslyn analyzers in your quality profile.
  </code></pre>
  
  <p>2- I tired creating a project and analyzing with <a href="https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+MSBuild" rel="nofollow noreferrer">SonarQube Scanner for MSBuild</a> </p>
  
  <p>But at the end, I have this error that appears</p>
  
  <pre><code>The SonarQube MSBuild integration failed: SonarQube was unable to collect 
  the required information about your projects.
  Possible causes:
   1. The project has not been built - the project must be built in between 
  the begin and end steps
   2. An unsupported version of MSBuild has been used to build the project. 
   Currently MSBuild 14.0 upwards are supported
   3. The begin, build or end steps have not all been launched from the 
   same folder
   Generation of the sonar-properties file failed. Unable to complete 
   SonarQube analysis.
  </code></pre>
  
  <p>I have Visual Studio 2015,2012,2010,2008 installed. How can I verify that I am using the correct MSBUILD verison (14) because I checked C:\Program Files (x86)\MSBuild and I found the version 14 there.</p>
  
  <p>Is there another issue to handle ?</p>
  
  <p>At the end, I need to be able to do the analysis in both the first and seocnd way.</p>
  
  <p>Thank you in advance!</p>