Dotnet sonarscanner commands throwing errors

Template for a good new topic, formatted with Markdown:

Received Projectkey not found in root error unless k: was passed first.
Received 403 response if /d:sonar.login=“token” is not passed after begin AND end

Command that ended up working:
dotnet sonarscanner begin /k:[key] / /o:[organization] /d:sonar.login="[sonar_token] "

msbuild /t:Rebuild

dotnet sonarscanner end /d:sonar.login=”[sonar_token]

Hope this saves someone else some time

Hey there.

It looks like in the documentation sonar.login is passed for both the begin and end steps in all the examples given. It’s also stated:

If this argument is added to the begin step, it must also be added to the end step.

Is there something else you think can be improved here?