we have customer report that SonarQubePrepare@5 does not work on macos-12
how I can contact developers of that task ?
we have customer report that SonarQubePrepare@5 does not work on macos-12
how I can contact developers of that task ?
Hey there.
This is the right place! And probably sending them directly here is the best place for them to get support.
Hey @denisyakimov07
There’s no specific issue that has been reported/investigated yet.
I’d suggest sharing your full Azure DevOps YAML pipeline, and logs from the build (not screenshots of logs). I’d also suggest you make sure you’ve checked all 4 suggested reasons this error can occur that are found in the log message.
The SQ scan failed the first time in the image version: ‘20231127.1’ macOS 12, then it was fixed in the image version: ‘20230921.1’.
Fail again in image version: ‘20231128.1’, ‘20231127.1’, ‘20231211.1’, ‘20231216.1’ macOS 12
No source code changes/pipeline between runs
Pipeline steps:
- task: SonarQubePrepare@5
inputs:
SonarQube: '$(SQ_ServiceConnectionsName)'
scannerMode: 'MSBuild'
projectKey: '$(SQ_ProjectKey)'
projectName: '$(SQ_ProjectKey)'
projectVersion: '$(correntVersionBuildNumber)'
extraProperties: |
sonar.verbose = true
continueOnError: true
2024-01-02T20:31:49.7579550Z ##[section]Starting: SonarQubePrepare
2024-01-02T20:31:49.7587080Z ==============================================================================
2024-01-02T20:31:49.7587330Z Task : Prepare Analysis Configuration
2024-01-02T20:31:49.7587510Z Description : Prepare SonarQube analysis configuration
2024-01-02T20:31:49.7587700Z Version : 5.18.4
2024-01-02T20:31:49.7587830Z Author : sonarsource
2024-01-02T20:31:49.7589700Z Help : Version: 5.18.4. More Information
2024-01-02T20:31:49.7590260Z ==============================================================================
2024-01-02T20:31:51.5645790Z [command]/usr/local/bin/dotnet /Users/runner/work/_tasks/SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157/5.18.4/dotnet-sonar-scanner-msbuild/SonarScanner.MSBuild.dll begin /k:*******-iOS
2024-01-02T20:31:52.0021100Z SonarScanner for MSBuild 5.15
2024-01-02T20:31:52.0022280Z Using the .NET Core version of the Scanner for MSBuild
2024-01-02T20:31:52.1634360Z Pre-processing started.
2024-01-02T20:31:52.1673380Z Preparing working directories…
2024-01-02T20:31:52.2538310Z 20:31:52.253 Updating build integration targets…
2024-01-02T20:31:52.9358920Z 20:31:52.935 Fetching analysis configuration settings…
2024-01-02T20:31:53.7545650Z 20:31:53.754 Provisioning analyzer assemblies for cs…
2024-01-02T20:31:53.7549840Z 20:31:53.754 Installing required Roslyn analyzers…
2024-01-02T20:31:53.7553370Z 20:31:53.755 Processing plugin: csharp version 9.13.0.79967
2024-01-02T20:31:54.2294690Z 20:31:54.229 Processing plugin: vbnet version 9.13.0.79967
2024-01-02T20:31:54.4378030Z 20:31:54.437 Processing plugin: securitycsharpfrontend version 10.3.0.27281
2024-01-02T20:31:54.9537710Z 20:31:54.953 Provisioning analyzer assemblies for vbnet…
2024-01-02T20:31:54.9624560Z 20:31:54.953 Installing required Roslyn analyzers…
2024-01-02T20:31:54.9641820Z 20:31:54.953 Processing plugin: csharp version 9.13.0.79967
2024-01-02T20:31:54.9667900Z 20:31:54.955 Processing plugin: vbnet version 9.13.0.79967
2024-01-02T20:31:54.9713200Z 20:31:54.97 Incremental PR analysis: Base branch parameter was not provided.
2024-01-02T20:31:54.9723660Z 20:31:54.97 Cache data is empty. A full analysis will be performed.
2024-01-02T20:31:55.0743580Z 20:31:55.073 Pre-processing succeeded.
2024-01-02T20:31:55.1109400Z ##[section]Finishing: SonarQubePrepare
- task: XamariniOS@2
displayName: 'XamariniOS build ${{ env.envName }}'
inputs:
solutionFile: '$(solutionFileName)'
configuration: '${{ env.configuration }}'
buildForSimulator: false
packageApp: true
continueOnError: false
- task: SonarQubeAnalyze@5
retryCountOnTaskFailure: 2
continueOnError: true
2024-01-02T20:41:21.4450100Z ##[section]Starting: SonarQubeAnalyze
2024-01-02T20:41:21.4464600Z ==============================================================================
2024-01-02T20:41:21.4464800Z Task : Run Code Analysis
2024-01-02T20:41:21.4464910Z Description : Run scanner and upload the results to the SonarQube server.
2024-01-02T20:41:21.4465050Z Version : 5.18.4
2024-01-02T20:41:21.4465140Z Author : sonarsource
2024-01-02T20:41:21.4465240Z Help : Version: 5.18.4. This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.
More Information
2024-01-02T20:41:21.4465580Z ==============================================================================
2024-01-02T20:41:21.8675780Z [command]/usr/local/bin/dotnet /Users/runner/work/_tasks/SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157/5.18.4/dotnet-sonar-scanner-msbuild/SonarScanner.MSBuild.dll end
2024-01-02T20:41:22.1273500Z SonarScanner for MSBuild 5.15
2024-01-02T20:41:22.1274890Z Using the .NET Core version of the Scanner for MSBuild
2024-01-02T20:41:22.2503320Z Post-processing started.
2024-01-02T20:41:22.3620690Z ##[error]20:41:22.361 The SonarScanner for MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
Possible causes:
GitHub issue
Can you share the logs of this task?
A post was split to a new topic: Azure DevOps Pipeline error
Unfortunately, it is against the company policy. If you need specific information from logs, I can share it.
Also, I would like to mention a few more details.
We have more than 30 Xamarin Android/iOS apps. All of iOS start failing SQ scan at the same time.
The first one I’m noting happened:
Current agent version: ‘3.230.0’
Operating System
macOS
12.7.1
21G920
Runner Image
Image: macos-12
Version: 20231115.2
Runner Image Provisioner
2.0.321.1
Current image version: ‘20231115.2’
Agent running as: ‘runner’
Prepare build directory.
Set build variables.
Download all required tasks.
Downloading task: DownloadPipelineArtifact (1.230.0)
Downloading task: CmdLine (2.229.0)
Downloading task: PowerShell (2.231.4)
Downloading task: NuGetToolInstaller (1.230.0)
Downloading task: NuGetCommand (2.230.0)
Downloading task: SonarQubePrepare (5.18.4)
Downloading task: InstallAppleCertificate (2.229.3)
Downloading task: InstallAppleProvisioningProfile (1.229.3)
Downloading task: XamariniOS (2.231.0)
Downloading task: SonarQubeAnalyze (5.18.4)
Checking job knob settings.
Knob: DockerActionRetries = true Source: $(VSTSAGENT_DOCKER_ACTION_RETRIES)
Knob: AgentToolsDirectory = /Users/runner/hostedtoolcache Source: ${AGENT_TOOLSDIRECTORY}
Knob: AgentEnablePipelineArtifactLargeChunkSize = true Source: $(AGENT_ENABLE_PIPELINEARTIFACT_LARGE_CHUNK_SIZE)
Knob: ContinueAfterCancelProcessTreeKillAttempt = true Source: $(VSTSAGENT_CONTINUE_AFTER_CANCEL_PROCESSTREEKILL_ATTEMPT)
Knob: ProcessHandlerTelemetry = true Source: $(AZP_75787_ENABLE_COLLECT)
Knob: IgnoreVSTSTaskLib = true Source: $(AZP_AGENT_IGNORE_VSTSTASKLIB)
Finished checking job knob settings.
Start tracking orphan processes.
Finishing: Initialize job
Agent machine name: ‘Mac-1701716524137’
Current agent version: ‘3.227.2’
Operating System
macOS
12.6.9
21G726
Runner Image
Image: macos-12
Version: 20231017.6
Runner Image Provisioner
2.0.312.1
Current image version: ‘20231017.6’
Agent running as: ‘runner’
Prepare build directory.
Set build variables.
Download all required tasks.
Downloading task: DownloadPipelineArtifact (1.230.0)
Downloading task: CmdLine (2.231.0)
Downloading task: PowerShell (2.231.6)
Downloading task: NuGetToolInstaller (1.231.0)
Downloading task: NuGetCommand (2.231.0)
Downloading task: SonarQubePrepare (5.18.4)
Downloading task: InstallAppleCertificate (2.231.0)
Downloading task: InstallAppleProvisioningProfile (1.231.0)
Downloading task: XamariniOS (2.231.0)
Downloading task: SonarQubeAnalyze (5.18.4)
Checking job knob settings.
Knob: DockerActionRetries = true Source: $(VSTSAGENT_DOCKER_ACTION_RETRIES)
Knob: AgentToolsDirectory = /Users/runner/hostedtoolcache Source: ${AGENT_TOOLSDIRECTORY}
Knob: AgentEnablePipelineArtifactLargeChunkSize = true Source: $(AGENT_ENABLE_PIPELINEARTIFACT_LARGE_CHUNK_SIZE)
Knob: ContinueAfterCancelProcessTreeKillAttempt = true Source: $(VSTSAGENT_CONTINUE_AFTER_CANCEL_PROCESSTREEKILL_ATTEMPT)
Knob: ProcessHandlerTelemetry = true Source: $(AZP_75787_ENABLE_COLLECT)
Knob: IgnoreVSTSTaskLib = true Source: $(AZP_AGENT_IGNORE_VSTSTASKLIB)
Finished checking job knob settings.
Start tracking orphan processes.
Finishing: Initialize job
Agent machine name: ‘Mac-1701887752358’
Current agent version: ‘3.230.2’
Operating System
macOS
12.7.1
21G920
Runner Image
Image: macos-12
Version: 20231127.1
Included Software: runner-images/images/macos/macos-12-Readme.md at macOS-12/20231127.1 · actions/runner-images · GitHub
Image Release: Release macOS 12 (20231127) Image Update · actions/runner-images · GitHub
Runner Image Provisioner
2.0.321.1
Current image version: ‘20231127.1’
Agent running as: ‘runner’
Prepare build directory.
Set build variables.
Download all required tasks.
Downloading task: DownloadPipelineArtifact (1.230.0)
Downloading task: CmdLine (2.231.0)
Downloading task: PowerShell (2.231.6)
Downloading task: NuGetToolInstaller (1.231.0)
Downloading task: NuGetCommand (2.231.0)
Downloading task: SonarQubePrepare (5.18.4)
Downloading task: InstallAppleCertificate (2.231.0)
Downloading task: InstallAppleProvisioningProfile (1.231.0)
Downloading task: XamariniOS (2.231.0)
Downloading task: SonarQubeAnalyze (5.18.4)
Checking job knob settings.
Knob: DockerActionRetries = true Source: $(VSTSAGENT_DOCKER_ACTION_RETRIES)
Knob: AgentToolsDirectory = /Users/runner/hostedtoolcache Source: ${AGENT_TOOLSDIRECTORY}
Knob: AgentEnablePipelineArtifactLargeChunkSize = true Source: $(AGENT_ENABLE_PIPELINEARTIFACT_LARGE_CHUNK_SIZE)
Knob: ContinueAfterCancelProcessTreeKillAttempt = true Source: $(VSTSAGENT_CONTINUE_AFTER_CANCEL_PROCESSTREEKILL_ATTEMPT)
Knob: ProcessHandlerTelemetry = true Source: $(AZP_75787_ENABLE_COLLECT)
Knob: IgnoreVSTSTaskLib = true Source: $(AZP_AGENT_IGNORE_VSTSTASKLIB)
Finished checking job knob settings.
Start tracking orphan processes.
Finishing: Initialize job
Operating System
macOS
12.6.9
21G726
Runner Image
Image: macos-12
Version: 20230921.1
Included Software: https://github.com/actions/runner-images/blob/macOS-12/20230921.1/images/macos/macos-12-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/macOS-12%2F20230921.1
Runner Image Provisioner
2.0.321.1
Current image version: ‘20230921.1’
Agent running as: ‘runner’
Prepare build directory.
Set build variables.
Download all required tasks.
Downloading task: DownloadPipelineArtifact (1.230.0)
Downloading task: CmdLine (2.231.0)
Downloading task: PowerShell (2.232.0)
Downloading task: NuGetToolInstaller (1.231.0)
Downloading task: NuGetCommand (2.231.0)
Downloading task: SonarQubePrepare (5.18.4)
Downloading task: InstallAppleCertificate (2.231.0)
Downloading task: InstallAppleProvisioningProfile (1.231.0)
Downloading task: XamariniOS (2.231.0)
Downloading task: SonarQubeAnalyze (5.18.4)
Downloading task: PublishPipelineArtifact (1.199.0)
Downloading task: ArchiveFiles (2.231.0)
Checking job knob settings.
Knob: DockerActionRetries = true Source: $(VSTSAGENT_DOCKER_ACTION_RETRIES)
Knob: AgentToolsDirectory = /Users/runner/hostedtoolcache Source: ${AGENT_TOOLSDIRECTORY}
Knob: AgentEnablePipelineArtifactLargeChunkSize = true Source: $(AGENT_ENABLE_PIPELINEARTIFACT_LARGE_CHUNK_SIZE)
Knob: ContinueAfterCancelProcessTreeKillAttempt = true Source: $(VSTSAGENT_CONTINUE_AFTER_CANCEL_PROCESSTREEKILL_ATTEMPT)
Knob: ProcessHandlerTelemetry = true Source: $(AZP_75787_ENABLE_COLLECT)
Knob: IgnoreVSTSTaskLib = true Source: $(AZP_AGENT_IGNORE_VSTSTASKLIB)
Finished checking job knob settings.
Start tracking orphan processes.
Finishing: Initialize job
Current agent version: ‘3.230.2’
Operating System
macOS
12.7.1
21G920
Runner Image
Image: macos-12
Version: 20231128.1
Included Software: https://github.com/actions/runner-images/blob/macOS-12/20231128.1/images/macos/macos-12-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/macOS-12%2F20231128.1
Runner Image Provisioner
2.0.321.1
Current image version: ‘20231128.1’
Agent running as: ‘runner’
Prepare build directory.
Set build variables.
Download all required tasks.
Downloading task: DownloadPipelineArtifact (1.230.0)
Downloading task: CmdLine (2.231.0)
Downloading task: PowerShell (2.232.0)
Downloading task: NuGetToolInstaller (1.231.0)
Downloading task: NuGetCommand (2.231.0)
Downloading task: SonarQubePrepare (5.18.4)
Downloading task: InstallAppleCertificate (2.231.0)
Downloading task: InstallAppleProvisioningProfile (1.231.0)
Downloading task: XamariniOS (2.231.0)
Downloading task: SonarQubeAnalyze (5.18.4)
Checking job knob settings.
Knob: DockerActionRetries = true Source: $(VSTSAGENT_DOCKER_ACTION_RETRIES)
Knob: AgentToolsDirectory = /Users/runner/hostedtoolcache Source: ${AGENT_TOOLSDIRECTORY}
Knob: AgentEnablePipelineArtifactLargeChunkSize = true Source: $(AGENT_ENABLE_PIPELINEARTIFACT_LARGE_CHUNK_SIZE)
Knob: ContinueAfterCancelProcessTreeKillAttempt = true Source: $(VSTSAGENT_CONTINUE_AFTER_CANCEL_PROCESSTREEKILL_ATTEMPT)
Knob: ProcessHandlerTelemetry = true Source: $(AZP_75787_ENABLE_COLLECT)
Knob: IgnoreVSTSTaskLib = true Source: $(AZP_AGENT_IGNORE_VSTSTASKLIB)
Finished checking job knob settings.
Start tracking orphan processes.
Finishing: Initialize job
Starting from 7 December, none of the SQ scans succeeded. (Azure agent "macOS 12.7.1 and macOS 12.7.2)
Some runs have no changes in source code or pipeline between the Success and Failed scans. Only Azure agent version (Dec 7, 2023).
Logs from empty project:
Logs.txt (119.9 KB)
Hey there.
Thanks!
Combing through your initial post (and the GitHub Actions issue), it looks like the macos image release that started causing the issue was one that installed .NET 8.
We had users facing issues with preview versions of .NET 8 that we… expected were fixed in the final release.
Could you run dotnet --info
in the context of your build using this image and return the results?
2024-01-05T15:00:01.0721230Z ##[section]Starting: CmdLine
2024-01-05T15:00:01.0728870Z ==============================================================================
2024-01-05T15:00:01.0729040Z Task : Command line
2024-01-05T15:00:01.0729100Z Description : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
2024-01-05T15:00:01.0729220Z Version : 2.231.0
2024-01-05T15:00:01.0729300Z Author : Microsoft Corporation
2024-01-05T15:00:01.0729370Z Help : CmdLine@2 - Command line v2 task | Microsoft Learn
2024-01-05T15:00:01.0729490Z ==============================================================================
2024-01-05T15:00:01.2699550Z Generating script.
2024-01-05T15:00:01.2701900Z Script contents:
2024-01-05T15:00:01.2702460Z dotnet --info
2024-01-05T15:00:01.2702770Z ========================== Starting Command Output ===========================
2024-01-05T15:00:01.2720970Z [command]/bin/bash --noprofile --norc /Users/runner/work/_temp/4bf459ec-60e3-4cfc-9bc3-cca584bdcced.sh
2024-01-05T15:00:02.0253940Z .NET SDK:
2024-01-05T15:00:02.0310200Z Version: 8.0.100
2024-01-05T15:00:02.0346850Z Commit: 57efcf1350
2024-01-05T15:00:02.2179240Z Workload version: 8.0.100-manifests.6c33ef20
2024-01-05T15:00:02.2179710Z
2024-01-05T15:00:02.2180490Z Runtime Environment:
2024-01-05T15:00:02.2284260Z OS Name: Mac OS X
2024-01-05T15:00:02.2285210Z OS Version: 12.7
2024-01-05T15:00:02.2308060Z OS Platform: Darwin
2024-01-05T15:00:02.2454130Z RID: osx-x64
2024-01-05T15:00:02.2495130Z Base Path: /Users/runner/.dotnet/sdk/8.0.100/
2024-01-05T15:00:02.2495640Z
2024-01-05T15:00:02.2496140Z .NET workloads installed:
2024-01-05T15:00:02.2624740Z Workload version: 8.0.100-manifests.6c33ef20
2024-01-05T15:00:02.2626290Z There are no installed workloads to display.
2024-01-05T15:00:02.2964410Z
2024-01-05T15:00:02.2968820Z Host:
2024-01-05T15:00:02.2969500Z Version: 8.0.0
2024-01-05T15:00:02.2970810Z Architecture: x64
2024-01-05T15:00:02.2971700Z Commit: 5535e31a71
2024-01-05T15:00:02.2972210Z
2024-01-05T15:00:02.2972730Z .NET SDKs installed:
2024-01-05T15:00:02.2973750Z 6.0.417 [/Users/runner/.dotnet/sdk]
2024-01-05T15:00:02.2974380Z 7.0.102 [/Users/runner/.dotnet/sdk]
2024-01-05T15:00:02.2974950Z 7.0.202 [/Users/runner/.dotnet/sdk]
2024-01-05T15:00:02.2975520Z 7.0.306 [/Users/runner/.dotnet/sdk]
2024-01-05T15:00:02.2976110Z 7.0.404 [/Users/runner/.dotnet/sdk]
2024-01-05T15:00:02.2976680Z 8.0.100 [/Users/runner/.dotnet/sdk]
2024-01-05T15:00:02.2977080Z
2024-01-05T15:00:02.2977580Z .NET runtimes installed:
2024-01-05T15:00:02.2978180Z Microsoft.AspNetCore.App 6.0.25 [/Users/runner/.dotnet/shared/Microsoft.AspNetCore.App]
2024-01-05T15:00:02.2978820Z Microsoft.AspNetCore.App 7.0.2 [/Users/runner/.dotnet/shared/Microsoft.AspNetCore.App]
2024-01-05T15:00:02.2979510Z Microsoft.AspNetCore.App 7.0.4 [/Users/runner/.dotnet/shared/Microsoft.AspNetCore.App]
2024-01-05T15:00:02.2980230Z Microsoft.AspNetCore.App 7.0.9 [/Users/runner/.dotnet/shared/Microsoft.AspNetCore.App]
2024-01-05T15:00:02.2980880Z Microsoft.AspNetCore.App 7.0.14 [/Users/runner/.dotnet/shared/Microsoft.AspNetCore.App]
2024-01-05T15:00:02.2981540Z Microsoft.AspNetCore.App 8.0.0 [/Users/runner/.dotnet/shared/Microsoft.AspNetCore.App]
2024-01-05T15:00:02.2982220Z Microsoft.NETCore.App 6.0.25 [/Users/runner/.dotnet/shared/Microsoft.NETCore.App]
2024-01-05T15:00:02.2982850Z Microsoft.NETCore.App 7.0.2 [/Users/runner/.dotnet/shared/Microsoft.NETCore.App]
2024-01-05T15:00:02.2983540Z Microsoft.NETCore.App 7.0.4 [/Users/runner/.dotnet/shared/Microsoft.NETCore.App]
2024-01-05T15:00:02.2984170Z Microsoft.NETCore.App 7.0.9 [/Users/runner/.dotnet/shared/Microsoft.NETCore.App]
2024-01-05T15:00:02.2984800Z Microsoft.NETCore.App 7.0.14 [/Users/runner/.dotnet/shared/Microsoft.NETCore.App]
2024-01-05T15:00:02.2985420Z Microsoft.NETCore.App 8.0.0 [/Users/runner/.dotnet/shared/Microsoft.NETCore.App]
2024-01-05T15:00:02.2985880Z
2024-01-05T15:00:02.2986360Z Other architectures found:
2024-01-05T15:00:02.2987720Z None
2024-01-05T15:00:02.2988130Z
2024-01-05T15:00:02.2988620Z Environment variables:
2024-01-05T15:00:02.2989220Z DOTNET_ROOT [/Users/runner/.dotnet]
2024-01-05T15:00:02.2989640Z
2024-01-05T15:00:02.2990170Z global.json file:
2024-01-05T15:00:02.2990710Z Not found
2024-01-05T15:00:02.2991010Z
2024-01-05T15:00:02.2991610Z Learn more:
2024-01-05T15:00:02.2992280Z dotnet command - .NET CLI | Microsoft Learn
2024-01-05T15:00:02.2992690Z
2024-01-05T15:00:02.2993260Z Download .NET:
2024-01-05T15:00:02.2993960Z .NET Downloads (Linux, macOS, and Windows)
2024-01-05T15:00:02.3085410Z ##[section]Finishing: CmdLine
My workaround is to use DotNet 7.0.404.
- task: UseDotNet@2
inputs:
version: 7.0.404
displayName: UseDotNet 7.0.404
2024-01-05T15:47:05.4150300Z ##[section]Starting: CmdLine
2024-01-05T15:47:05.4186320Z ==============================================================================
2024-01-05T15:47:05.4186680Z Task : Command line
2024-01-05T15:47:05.4187030Z Description : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
2024-01-05T15:47:05.4187270Z Version : 2.231.0
2024-01-05T15:47:05.4187410Z Author : Microsoft Corporation
2024-01-05T15:47:05.4187860Z Help : CmdLine@2 - Command line v2 task | Microsoft Learn
2024-01-05T15:47:05.4188230Z ==============================================================================
2024-01-05T15:47:06.1108290Z Generating script.
2024-01-05T15:47:06.2953520Z Script contents:
2024-01-05T15:47:06.3042990Z dotnet --info
2024-01-05T15:47:06.3121160Z ========================== Starting Command Output ===========================
2024-01-05T15:47:06.4400940Z [command]/bin/bash --noprofile --norc /Users/runner/work/_temp/6869d18c-4dff-4bbf-b5f6-27b8ff56d57e.sh
2024-01-05T15:47:06.4773690Z .NET SDK:
2024-01-05T15:47:06.4831000Z Version: 7.0.404
2024-01-05T15:47:06.4879630Z Commit: 22f221a24c
2024-01-05T15:47:06.4888790Z
2024-01-05T15:47:06.4897190Z Runtime Environment:
2024-01-05T15:47:06.5004890Z OS Name: Mac OS X
2024-01-05T15:47:06.5007550Z OS Version: 12.7
2024-01-05T15:47:06.5035110Z OS Platform: Darwin
2024-01-05T15:47:06.5219850Z RID: osx.12-x64
2024-01-05T15:47:06.5221320Z Base Path: /Users/runner/hostedtoolcache/dotnet/sdk/7.0.404/
2024-01-05T15:47:06.5240050Z
2024-01-05T15:47:06.5243920Z Host:
2024-01-05T15:47:06.5244640Z Version: 7.0.14
2024-01-05T15:47:06.5245090Z Architecture: x64
2024-01-05T15:47:06.5245520Z Commit: 808851b07a
2024-01-05T15:47:06.5246010Z
2024-01-05T15:47:06.5246970Z .NET SDKs installed:
2024-01-05T15:47:06.5247530Z 7.0.404 [/Users/runner/hostedtoolcache/dotnet/sdk]
2024-01-05T15:47:06.5247740Z
2024-01-05T15:47:06.5248030Z .NET runtimes installed:
2024-01-05T15:47:06.5248670Z Microsoft.AspNetCore.App 7.0.14 [/Users/runner/hostedtoolcache/dotnet/shared/Microsoft.AspNetCore.App]
2024-01-05T15:47:06.5249320Z Microsoft.NETCore.App 7.0.14 [/Users/runner/hostedtoolcache/dotnet/shared/Microsoft.NETCore.App]
2024-01-05T15:47:06.5250040Z
2024-01-05T15:47:06.5251200Z Other architectures found:
2024-01-05T15:47:06.5252010Z None
2024-01-05T15:47:06.5252740Z
2024-01-05T15:47:06.5253650Z Environment variables:
2024-01-05T15:47:06.5254420Z DOTNET_ROOT [/Users/runner/hostedtoolcache/dotnet]
2024-01-05T15:47:06.5255120Z
2024-01-05T15:47:06.5256050Z global.json file:
2024-01-05T15:47:06.5257040Z Not found
2024-01-05T15:47:06.5257760Z
2024-01-05T15:47:06.5258610Z Learn more:
2024-01-05T15:47:06.5306740Z dotnet command - .NET CLI | Microsoft Learn
2024-01-05T15:47:06.5307630Z
2024-01-05T15:47:06.5308730Z Download .NET:
2024-01-05T15:47:06.5309470Z .NET Downloads (Linux, macOS, and Windows)
2024-01-05T15:47:06.5378710Z ##[section]Finishing: CmdLine
But my question is still open: How can we run an SQ scan on the latest DotNet?
Hi,
Apologies for the delay. I am following up on this issue.
While I don’t have a full understanding of what is happening yet, I want to give an update on the current state of this investigation.
What I think is now happening is the following:
LocalApplicationData
location, on MacOS exclusively. This is the location used to place the SonarQube.Integration.ImportBefore.targets
file necessary to run Sonar analyzers during project build.targets
file at the new location.targets
file.targets
file.SonarQubeAnalyze
error that we can see from the logs.I am currently trying to recreate a MacOS environment where the actual build happens on .NET 7, even when .NET 8 is available on the machine.
While I am trying to reproduce that, it would be valuable to add the following target to any of the csproj
you build.
<Target Name="DisplayMessages" BeforeTargets="CoreCompile">
<Message Importance="high" Text="[DEBUG] LocalAppData = $(LocalAppData)" />
<Message Importance="high" Text="[DEBUG] MSBuildToolsVersion = $(MSBuildToolsVersion)" />
<Message Importance="high" Text="[DEBUG] TargetFramework = $(TargetFramework)" />
<Message Importance="high" Text="[DEBUG] MSBuildRuntimeVersion = $([System.Runtime.InteropServices.RuntimeInformation]:: FrameworkDescription.ToString())" />
<Message Importance="high" Text="[DEBUG] CLRVersion = $([System.Environment]::Version)" />
</Target>
Those will log some variables, that I would like to know the value of.
If the scenario above matches what’s actually happening in your build, we should be able to provide a fix.
That will however require a new release of the Scanner for .NET.
I hope I will soon be able to provide updates.
Best regards,
Antonio
Hi there,
Good news! We have released a new version of the Scanner for .NET that should fix the issue.
Can you please try this one out and let us know?
Thanks for your patience,
Antonio