Error in sonarqube while executing dotnet build

Hello All,

I am new to this Sonarqube, so i thought to doing a test into my local project. I downloaded the sonarqube community edition (sonarqube-8.9.6.50800).

  1. After generating token for my project, the analyzing is working fine.
  2. while executing dotnet build command I am getting below error

error CS2046 : Command-line syntax error : ‘C:\Users\7504561\OneDrive - TeleTech Holdings, Inc\Sonar Qube Testing Project\SonarQubeTest.sonarqube\out\0\Issues.json’ is not a valid value for the ‘/errorlog:’ option. The value must be of the form ‘[,version={1|1.0|2|2.1}]’. [C:\Users\7504561\OneDrive - TeleTech Holdings, Inc\Sonar Qube Testing Project\SonarQubeTest\SonarQubeTest.csproj]

I don’t know what i am doing wrong.

My project is a simple .netcore web app (3.1). Normal building is working fine and is running also.
Can anyone please help me out with this.

Tried the different version also (sonarqube-9.2.4.50792). Same error

Hey there.

Take a look at this answer:

1 Like

Hey,

I checked the issue but it didn’t help me with my problem.

This issue is coming only with .net core 3.1. I tried with .net core 2.1 and is working fine. I tried wit .net 5.0 and there also it is working fine.

Hi @Mudit_Pandey,

Can you share the following logs please?

  • the verbose output of the scanner commands (run SonarScanner.MSBuild.exe begin /k:“MyProject” /d:sonar.verbose=true as the begin step)
  • the output of running MSBuild in verbose mode (/v:d)

Thanks.

Hi @Duncan_Pocklington,

Sorry for the delay, I’ve attached the files for you to look into it:-
BuilgLog.json (457.2 KB)
PreProcessingLog.json (6.8 KB)

Hi @Mudit_Pandey,

I was able to reproduce this issue locally when building under any directory that has a comma or semi-colon in the name (the version of .NET the project is targeting doesn’t seem to have any effect).

It looks like an error in how the C# compiler parses the /errorlog: argument. I’ve raised a bug against the compiler.

Does the analysis succeed if you run it from a directory that does not have a comma or semi-colon in the name?

Thanks @duncanp,

I didn’t tried it before but yeah it worked just now I tried and it worked like charm. Thanks a lot for your help.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.