Sing the .NET Framework version of the Scanner for MSBuild Post-processing started

Hello, I’m trying to run sonnar scanner on my machine locally, I have a C# .net framework webforms project, which requires a specific version of msbuild scanner to execute the code verification command, but I’m encountering a generic error that I can’t get bypass.
Command I’m running:
SonarScanner.MSBuild.exe begin /k:“hidden-content-in-publication” /d:sonar.host.url=“hidden-content-in-publication” /d:sonar.token=“hidden-content-in- Publication”

MsBuild.exe /t:Rebuild

SonarScanner.MSBuild.exe end /d:sonar.token=“hidden-content-in-publication”

I’m getting the following error:

  • SonarScanner for MSBuild 6.2
    Using the .NET Framework version of the Scanner for MSBuild
    Post-processing started.
    09:49:21.327 The SonarScanner for MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
    Possible causes:
  1. The project has not been built - the project must be built in between the begin and end steps.
  2. An unsupported version of MSBuild has been used to build the project. Supported versions: MSBuild 16 and higher.
  3. The begin, build and end steps have not all been launched from the same folder.
  4. None of the analyzed projects have a valid ProjectGuid and you have not used a solution (.sln).
    09:49:21.333 Generation of the sonar-properties file failed. Unable to complete the analysis.
    09:49:21.345 Post-processing failed. Exit code: 1

I’m running the begin and end step.
My msbuild is version 17.4.0.51802
I’m running begin, built and end in the same folder
My project has a GUID in the .sln file

can anybody help me? I’ve had this problem for a few days now, I would be very grateful for any information.

Welcome to Sonar forums!

Have you tried specifying the *.sln file to rebuild to MSBuild.exe?
Have you tried using older versions of the MSBuild scanner?

1 Like

Hi Lexy, Thanks.
Yes, I specified the .sln file.
I also tested other versions of sonnarscanner. Very old versions return the error:
SonarScanner for MSBuild 5.3.2
Using the .NET Framework version of the Scanner for MSBuild
Pre-processing started.
Preparing working directories…
08:17:05.68 Updating build integration targets…
08:17:05.974 The token you provided doesn’t have sufficient rights to check license.
08:17:05.976 Preprocessing failed. Exit code: 1

Hi,

You said it’s a webforms project. That’s .aspx? Sorry, but we don’t support that.

 
:frowning:
Ann