Version string portion was too short or too long on sonarcloud

I want to use MSBuild for SonarCloud. but i run MSBuild.SonarQube.Runner.exe begin then the system is error as below:

10:34:15.866 Fetching analysis configuration settings…
10:34:17.555 Failed to request and parse ‘’: Version string portion was too short or too long.
Unhandled Exception: System.ArgumentException: Version string portion was too short or too long.
at System.Version.VersionResult.SetFailure(ParseFailureKind failure, String argument)
at System.Version.TryParseVersion(String version, VersionResult& result)
at System.Version.Parse(String input)
at System.Version…ctor(String version)
at SonarScanner.MSBuild.PreProcessor.SonarWebService.<>c__DisplayClass15_0.b__0()
at SonarScanner.MSBuild.PreProcessor.SonarWebService.DoLogExceptions[T](Func1 op, String url, Action1 onError)
at SonarScanner.MSBuild.PreProcessor.SonarWebService.DownloadServerVersion()
at SonarScanner.MSBuild.PreProcessor.SonarWebService.GetServerVersion()
at SonarScanner.MSBuild.PreProcessor.SonarWebService.GetProperties(String projectKey, String projectBranch)
at SonarScanner.MSBuild.PreProcessor.TeamBuildPreProcessor.FetchArgumentsAndRulesets(ISonarQubeServer server, ProcessedArgs args, TeamBuildSettings settings, IDictionary2& serverSettings, List1& analyzersSettings)
at SonarScanner.MSBuild.PreProcessor.TeamBuildPreProcessor.DoExecute(ProcessedArgs localSettings)
at SonarScanner.MSBuild.BootstrapperClass.PreProcess()
at SonarScanner.MSBuild.BootstrapperClass.Execute()
at SonarScanner.MSBuild.Program.Execute(String args, ILogger logger)
at MSBuild.SonarQube.Runner.Program.Main(String args)

I try to connect request for sonarcloud( but it is fail.Pls provide “” of sonarcloud help me .
Currently, i input on SonarQube.Analysis.xml as:
with sonar qube then url
then request: http://localhost:9000/myPath/api/server/version
so, what is url for sonarcloud?

Hi @VuHuong and welcome to the community !

Why the xxxx at the end ? What it should represents ?

SonarCloud base url is :


Hi @mickaelcaro
That’s just my project name on Sonar cloud. I am using via bitbucket.
Is it related to how we configure?

Yes you don’t need to configure it in the URL directly, that will be done after by the Scanner(s).

Currently, I am configuring the on SonarQube.Analysis.xml file as below:

Is this config has any problem? should just be “

I changed the URL but still get issue with below message:

15:52:13.155 Failed to request and parse ‘’: The remote server returned an error: (403) Forbidden.

Do i need to config something on SonarCloud?

Are you using the Scanner for MSBuild in standalone mode ? Like you invoke it in commandline ?

If so, you need to pass a token that you generated on SonarCloud side ( . The user that generates the token should have the “Execute analysis” right, at least.

1 Like

Great. The scanner run successfully.
Thank you for your promptly support.

1 Like