Installation SonarScanner for MSBuild for .NET Framework or .NET Core

I am new to SonarQube and am having difficulties getting started. I was able to get this up and running but trying to get SonarQube to read my C# Project is a little confusing.

I am trying to install the SonarScanner for MSBuild for .NET Framework or .NET Core, however, the documentation says “Expand the downloaded file into the directory of your choice”

The issue is I was not prompted to download anything. Is this referring to my SonarQube installation?

Thanks in advance!

Hi,

Could you orient me with a link to the documentation you’re using?

 
Thx,
Ann

@ganncamp Sure thing! It is here

When I click on this download button. It directs me to this documentation above

Hi,

It’s not clear to me which download button you mean.

Did you download a scanner from the grey block at the top of the documentation page?

(Just FYI, your localhost docs link isn’t going to work for people who don’t have a copy of SonarQube running locally. So for posterity, here’s the public version of the same docs link: https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-msbuild/)

 
Ann

@ganncamp No, I do not see a grey box at the top of the page. Here is what my local page looks like

I did the first step and the second step has the blue and white button I was talking about. When you click that button it does not download anything.

Hi,

Sorry for the delay in coming back to you. When you click that button, it takes you to a page (with a grey box on top) where you choose what to download.

 
HTH,
Ann

@ganncamp Correct, the download button never downloads anything instead it takes me to the documentation page.

And on the documentation page you have the option to choose exactly what flavor to download…

 
Ann

@ganncamp That’s the issue. The documentation page I am directed to assumes I have already downloaded this MSBuild.

In the first step it says to " Expand the downloaded file into the directory of your choice. We’ll refer to it as $install_directory in the next steps."

Because nothing downloaded locally, I do not have anything to “Expand”. Unless I am doing this all wrong?

Hi,

The idea is that you will start at the top of the page & download something from a link in the grey box. From there, you’ll have something to expand. :smiley:

 
HTH,
Ann

Hello,

I have the same problem. Here’s what the top of the documentation page looks like for SonarQube running on a server in my network:

Notice that there’s no grey box.

When I go to the Online Documentation of SonarScanner for .NET then the grey box does appear:

Please have someone look at it because I’m getting errors in the Chrome console:

http://10.250.0.9:9000/images/info.svg                                       Failed to load resource: the server responded with a status of 404 ()
http://10.250.0.9:9000/images/exclamation.svg                                Failed to load resource: the server responded with a status of 404 ()
http://10.250.0.9:9000/documentation/analysis/scan/sonarscanner-for-msbuild/ Access to fetch at 'https://update.sonarsource.org/scannermsbuild.json' from origin 'http://10.250.0.9:9000' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://docs.sonarqube.org' that is not equal to the supplied origin. Have the server send the header with a valid value, or, if an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
https://update.sonarsource.org/scannermsbuild.json                           Failed to load resource: net::ERR_FAILED

The build version of the SonarQube community server I’m testing on is 8.8.0.42792.

With best regards,

Bert

Hi Bert,

In fact, we’re aware of this. It was caused by some changes we made internally to beef up security. For the record, we’re going to drop this in future versions (SONAR-14725). It’s not clear to me there will be a fix for embedded documentation. Fortunately, you have access from the online docs.

 
HTH,
Ann

As a followup, I think this should be fixed on our side now.

 
Ann