When I was configuring the SonarScanner for .NET tool, I encountered the following problem that I could not solve, and I could not find more detailed logs.
How can I solve this problem?
SonarqubeVersion: 10.6.0.92116
SonarScanner for .Net Version: 8.0.197834
What is the result?
If there is an error, then you have an issue on your server, or the way things are configured.
How are you running SonarQube locally?
Today I tried to close the proxy and run sonarscanner, and it reported the following error, which is different from before. But when I open the proxy again, it still reports this error.
Surprisingly, after I removed the token in the SonarQube.Analysis.xml configuration and the token in the execution command, the error no longer occurred.
Hi @Evan.Lin,
I’m glad it’s working now! Maybe you had the token configured incorrectly, somehow. Where is the token stored now? It should only be needed in one place.
I have not configured a token anywhere. I directly generated a global token on the server.
Then I removed all the tokens in the following three places:
C:\WeakScanner\SonarQube\sonar-scanner-8.0.1.97834-net\SonarQube.Analysis.xml
C:\Users\appeon\.dotnet\tools\.store\dotnet-sonarscanner\8.0.1\dotnet-sonarscanner\8.0.1\tools\netcoreapp3.1\any\SonarQube.Analysis.xml
dotnet-sonarscanner begin /k:"DesignerWebApp1" /d:sonar.host.url="http://localhost:9000" /d:"sonar.verbose=true"