From: Joe Tingsanchali Date: Fri, 26 Feb 2021 21:59:07 +0000 (-0600) Subject: DOCS Add table for sonar scanner for .NET flavor matched to its specific invocation X-Git-Tag: 8.8.0.42792~66 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=41d439e69840c3ddb13b321399f9047536f6a006;p=sonarqube.git DOCS Add table for sonar scanner for .NET flavor matched to its specific invocation --- diff --git a/server/sonar-docs/src/pages/analysis/scan/sonarscanner-for-msbuild.md b/server/sonar-docs/src/pages/analysis/scan/sonarscanner-for-msbuild.md index a238feabeb1..35e03b72422 100644 --- a/server/sonar-docs/src/pages/analysis/scan/sonarscanner-for-msbuild.md +++ b/server/sonar-docs/src/pages/analysis/scan/sonarscanner-for-msbuild.md @@ -77,6 +77,8 @@ The _--version_ argument is optional. If it is omitted the latest version will b There are two versions of the SonarScanner for .NET. In the following commands, you need to pass an [authentication token](/user-guide/user-token/) using the `sonar.login` property. +### "Classic" .NET Framework Invocation + The first version is based on the "classic" .NET Framework. To use it, execute the following commands from the root folder of your project: ``` @@ -85,7 +87,9 @@ MSBuild.exe /t:Rebuild SonarScanner.MSBuild.exe end /d:sonar.login="myAuthenticationToken" ``` -Note: On Mac OS or Linux, you can also use `mono `. +Note: On macOS or Linux, you can also use `mono `. + +### .NET Core and .NET Core Global Tool Invocation The second version is based on .NET Core which has a very similar usage: @@ -105,6 +109,14 @@ dotnet build dotnet sonarscanner end /d:sonar.login="myAuthenticationToken" ``` +In summary, the invocation of the SonarScanner for .NET will depend on the scanner flavor: + + Scanner Flavor | Invocation + --- | --- + .NET 5 | `dotnet ` etc. + .NET Core Global Tool | `dotnet sonarscanner begin` etc. + .NET Core 2.0+ | `dotnet ` etc. + .NET Framework 4.6+|`SonarScanner.MSBuild.exe begin` etc. Notes: