Skip to content

Commit 0e9b7d0

Browse files
mickael-caro-sonarsourceduncanp-sonar
authored andcommitted
Fixed organization argument name on documentation. (#784)
1 parent 0b0c91f commit 0e9b7d0

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

sonar-docs/analysis/scan/sonarscanner-for-msbuild.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Consider setting file system permissions to restrict access to this file.:
4545

4646
### Installation of the SonarScanner for MSBuild .NET Core Global Tool
4747
```
48-
dotnet tool install --global dotnet-sonarscanner --version 4.3.1
48+
dotnet tool install --global dotnet-sonarscanner --version 4.6.2
4949
```
5050
The _--version_ argument is optional. If it is omitted the latest version will be installed.
5151

@@ -59,7 +59,7 @@ There are two versions of the SonarScanner for MSBuild.
5959

6060
The first version is based on the “classic” .NET Framework. To use it, execute the following commands from the root folder of your project:
6161
```
62-
SonarScanner.MSBuild.exe begin /k:"project-key" <!-- sonarcloud -->/d:sonar.organization="<organization>" /d:sonar.login="<token>" <!-- /sonarcloud -->
62+
SonarScanner.MSBuild.exe begin /k:"project-key" <!-- sonarcloud -->/o:"<organization>" /d:sonar.login="<token>" <!-- /sonarcloud -->
6363
MSBuild.exe <path to solution.sln> /t:Rebuild
6464
SonarScanner.MSBuild.exe end <!-- sonarcloud -->/d:sonar.login="<token>" <!-- /sonarcloud -->
6565
```
@@ -68,20 +68,20 @@ Note: On Mac OS or Linux, you can also use `mono <path to SonarScanner.MSBuild.e
6868

6969
The second version is based on .NET Core which has a very similar usage:
7070
```
71-
dotnet <path to SonarScanner.MSBuild.dll> begin /k:"project-key"
71+
dotnet <path to SonarScanner.MSBuild.dll> begin /k:"project-key" <!-- sonarcloud -->/o:"<organization>" /d:sonar.login="<token>" <!-- /sonarcloud -->
7272
dotnet build <path to solution.sln>
73-
dotnet <path to SonarScanner.MSBuild.dll> end
73+
dotnet <path to SonarScanner.MSBuild.dll> end <!-- sonarcloud -->/d:sonar.login="<token>" <!-- /sonarcloud -->
7474
```
7575
The .NET Core version can also be used as a .NET Core Global Tool.
7676
After installing the Scanner as a global tool as described above it can be invoked as follows:
7777
```
7878
dotnet tool install --global dotnet-sonarscanner
79-
dotnet sonarscanner begin /k:"project-key"
79+
dotnet sonarscanner begin /k:"project-key" <!-- sonarcloud -->/o:"<organization>" /d:sonar.login="<token>" <!-- /sonarcloud -->
8080
dotnet build <path to solution.sln>
81-
dotnet sonarscanner end
81+
dotnet sonarscanner end <!-- sonarcloud -->/d:sonar.login="<token>" <!-- /sonarcloud -->
8282
```
8383

84-
Same as above, if you are targetting a SonarCloud project, will have to add both the organization and a login for authentication.
84+
Same as above, if you are targeting a SonarCloud project, you will have to add both the organization and a login for authentication.
8585

8686
Notes:
8787

@@ -99,7 +99,7 @@ Parameter|Description
9999
`/k:<project-key>`|[required] Specifies the key of the analyzed project in SonarQube
100100
`/n:<project name>`|[optional] Specifies the name of the analyzed project in SonarQube. Adding this argument will overwrite the project name in SonarQube if it already exists.
101101
`/v:<version>`|[recommended] Specifies the version of your project.
102-
<!-- sonarcloud --> `/d:sonar.organization=<organization>`|[required] Specifies the name of the target organization in SonarCloud <!-- /sonarcloud -->
102+
<!-- sonarcloud --> `/o:<organization>`|[required] Specifies the name of the target organization in SonarCloud. <!-- /sonarcloud -->
103103
`/d:sonar.login=<username> or <token>`| [optional] Specifies the username or access token to authenticate with to SonarQube. If this argument is added to the begin step, it must also be added on the end step.
104104
`/d:sonar.password=<password>`|[optional] Specifies the password for the SonarQube username in the `sonar.login` argument. This argument is not needed if you use authentication token. If this argument is added to the begin step, it must also be added on the end step.
105105
`/d:sonar.verbose=true`|[optional] Sets the logging verbosity to detailed. Add this argument before sending logs for troubleshooting.
@@ -188,7 +188,7 @@ Concurrent analyses (i.e. parallel analysis of two solutions on the same build m
188188
1. Go in the `Targets` folder and copy the folder `SonarQube.Integration.ImportBefore.targets`
189189
1. Paste it under your build tool global `ImportBefore` folder (if the folder doesn't exist, create it).
190190
* For MSBuild, the path is `<MSBUILD_INSTALL_DIR>\<Version>\Microsoft.Common.targets\ImportBefore` where <MSBUILD_INSTALL_DIR> is:
191-
*For v14, default path is: `C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.Targets\ImportBefore`
191+
* For v14, default path is: `C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.Targets\ImportBefore`
192192
* For v15, default path is: `C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Microsoft.Common.targets\ImportBefore` (for VS Community Edition)
193193
* For v16, default path is: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Microsoft.Common.targets` (for VS Community Edition)
194194
* For dotnet, the path is `<DOTNET_SDK_INSTALL_DIR>\15.0\Microsoft.Common.targets\ImportBefore` where `<DOTNET_SDK_INSTALL_DIR>` can be found using the `dotnet --info` and looking for the Base Path property.
@@ -204,5 +204,5 @@ To instruct the Java VM to use specific proxy settings or when there is no syste
204204
```
205205
SONAR_SCANNER_OPTS = "-Dhttp.proxyHost=yourProxyHost -Dhttp.proxyPort=yourProxyPort"
206206
```
207-
Where _yourProxyHost_ and _yourProxyPort_ are the hostname and the port of your proxy server. There are additional proxy settings for https, authentication and exclusions that could be passed to the Java VM, for full reference visit the following article: https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html
207+
Where _yourProxyHost_ and _yourProxyPort_ are the hostname and the port of your proxy server. There are additional proxy settings for https, authentication and exclusions that could be passed to the Java VM. For more information see the following article: https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html
208208

0 commit comments

Comments
 (0)