Missing blame information from Azure DevOps git repo via Azure DevOps pipeline

I’m unable to get blame information into SonarCloud, so the assignment of issues doesn’t work. I’ve had the same issue across multiple repos and 7 different projects (some C# and some Typescript) but all the analyze logs quote the same lines :

WARN: Missing blame information for the following files:
WARN: * ExampleOne/ProjectOne/Program.cs
WARN: This may lead to missing/broken features in SonarCloud

Azure DevOps git repo
Azure DevOps pipeline

I’m having the same issues with both C# Code (MSBuild scanner) and TypeScript code (CLI scanner).

For the sake of repro, I’ve created a clean repo, added a simple console app with a couple of issues and a new Azure Devops pipeline using the 3 SonarCloud extensions. I’m getting the same results.

GIT BLAME returns the users you’d expect and our dev IDEs show who was responsible for the code, but sonarcloud’s sonar scanners don’t seem able to & I’m out of ideas.

My pipeline yaml file looks like this :

# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framework.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core

trigger:
- development

pool:
  vmImage: 'windows-latest'

variables:
  solution: '**/*.sln'
  buildPlatform: 'Any CPU'
  buildConfiguration: 'Release'

steps:
- task: NuGetToolInstaller@1

- task: NuGetCommand@2
  inputs:
    restoreSolution: '$(solution)'
- task: SonarCloudPrepare@1
  inputs:
    SonarCloud: 'SonarCloud'
    organization: 'xxxxxxxxxxxxxxxxxxxxxxxxxxx'
    scannerMode: 'MSBuild'
    projectKey: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx_MacTest'
    projectName: 'MacTest'
    projectVersion: $(Build.BuildNumber)
- task: VSBuild@1
  inputs:
    solution: '$(solution)'
    msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactStagingDirectory)\WebApp.zip" /p:DeployIisAppPath="Default Web Site"'
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'
- task: SonarCloudAnalyze@1
- task: SonarCloudPublish@1
  inputs:
    pollingTimeoutSec: '300'
- task: VSTest@2
  inputs:
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

Relevant looking output from the analyze step (can provide more, but it’s quite large obviously)

Starting: SonarCloudAnalyze

Task : Run Code Analysis
Description : Run scanner and upload the results to the SonarCloud server.
Version : 1.31.1
Author : sonarsource
Help : Version: 1.31.1. This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.

More Information

D:\a_tasks\SonarCloudPrepare_14d9cde6-c1da-4d55-aa01-2965cd301255\1.28.1\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe end
SonarScanner for MSBuild 5.6
.
.
INFO: SCM Publisher SCM provider for this project is: git
INFO: SCM Publisher 1 source file to be analyzed
INFO: Blaming files using native implementation
INFO: Blaming files using native implementation (done) | time=53ms
INFO: SCM Publisher 0/1 source files have been analyzed (done) | time=242ms
WARN: Missing blame information for the following files:
WARN: * ExampleOne/ProjectOne/Program.cs
WARN: This may lead to missing/broken features in SonarCloud

Hi @mcrimes ,

Welcome to Sonar Community! :sonar:

Can you be more specific at this step? You added a couple of issues, but did you git add and git commit those changes before git push’ing it to your remote repository?

If you don’t do git add/git commit/git push or some form of update in the remote repository, blame data and git annotations will be missing, hence the following warning in your Sonar analysis logs:

Yes, we’ve done lots of commits to git over the last month. As I said, GIT BLAME is reporting commit authors quite happily, but sonar scanner isn’t reporting the same.

Happy to post any additional info which might be useful, but aside from the whole analysis log, I’m not sure what else might be helpful.

Hi,

Looking at your pipeline, I see restoreSolution, but I don’t see a check out. I’m not familiar with Azure Devops, so I have to ask: does restoreSolution put a .git directory in your project? Because the error is telling you that analysis isn’t finding the SCM metadata it needs and that typically caused by some hiccup in the checkout process that means there’s no .git subdirectory in the project root.

 
HTH,
Ann

1 Like

Hi Ann,
Thanks for the reply.

I’ve tried it with explicit checkouts and without (where the pipeline does it implicitly), but both seem to look identical in the logs in the end.

This is the output log from the checkout step (implicit or explicit) :

Starting: Checkout Mactemp@development to s
==============================================================================
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
Syncing repository: Mactemp (Git)
Prepending Path environment variable with directory containing 'git.exe'.
git version
git version 2.36.1.windows.1
git lfs version
git-lfs/2.13.3 (GitHub; windows amd64; go 1.16.2; git a5e65851)
git init "D:\a\1\s"
Initialized empty Git repository in D:/a/1/s/.git/
git remote add origin https://xxxxxxxxxxxxxxxxxxx.visualstudio.com/xxxxxxxxxxxxxxxxxxx/_git/Mactemp
git config gc.auto 0
git config --get-all http.https://xxxxxxxxxxxxxxxxxxx.visualstudio.com/xxxxxxxxxxxxxxxxxxx/_git/Mactemp.extraheader
git config --get-all http.extraheader
git config --get-regexp .*extraheader
git config --get-all http.proxy
git config http.version HTTP/1.1
git -c http.extraheader="AUTHORIZATION: bearer ***" fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin
remote: Azure Repos        
remote: 
remote: Found 40 objects to send. (2 ms)        
From https://xxxxxxxxxxxxxxxxxxx.visualstudio.com/xxxxxxxxxxxxxxxxxxx/_git/Mactemp
 * [new branch]      development -> origin/development
git -c http.extraheader="AUTHORIZATION: bearer ***" fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin  +a30165b8e35391577f31a7eed040822ae6564d0a
From https://xxxxxxxxxxxxxxxxxxx.visualstudio.com/xxxxxxxxxxxxxxxxxxx/_git/Mactemp
 * branch            a30165b8e35391577f31a7eed040822ae6564d0a -> FETCH_HEAD
git checkout --progress --force a30165b8e35391577f31a7eed040822ae6564d0a
Note: switching to 'a30165b8e35391577f31a7eed040822ae6564d0a'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at a30165b Update azure-pipelines.yml for Azure Pipelines
Finishing: Checkout Mactemp@development to s

I’ve added a step in which does the following, “dir”, “dir .git”, git --help
The output is as follows :

Starting: CmdLine
==============================================================================
Task         : Command line
Description  : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
Version      : 2.201.1
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
==============================================================================
Generating script.
========================== Starting Command Output ===========================
"C:\Windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "D:\a\_temp\67ba50e3-f865-473d-a04f-9edb0f190da2.cmd""
 Volume in drive D is Temp
 Volume Serial Number is 4007-3406

 Directory of D:\a\1\s

08/11/2022  12:44 PM    <DIR>          .
08/11/2022  12:44 PM    <DIR>          ..
08/11/2022  12:44 PM             1,474 azure-pipelines.yml
08/11/2022  12:44 PM    <DIR>          ExampleOne
08/11/2022  12:44 PM               985 README.md
               2 File(s)          2,459 bytes
               3 Dir(s)  14,752,182,272 bytes free
 Volume in drive D is Temp
 Volume Serial Number is 4007-3406

 Directory of D:\a\1\s\.git

08/11/2022  12:44 PM    <DIR>          ..
08/11/2022  12:44 PM               293 config
08/11/2022  12:44 PM                73 description
08/11/2022  12:44 PM               157 FETCH_HEAD
08/11/2022  12:44 PM                41 HEAD
08/11/2022  12:44 PM    <DIR>          hooks
08/11/2022  12:44 PM               583 index
08/11/2022  12:44 PM    <DIR>          info
08/11/2022  12:44 PM    <DIR>          logs
08/11/2022  12:44 PM    <DIR>          objects
08/11/2022  12:44 PM    <DIR>          refs
               5 File(s)          1,147 bytes
               6 Dir(s)  14,752,182,272 bytes free


usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           [--super-prefix=<path>] [--config-env=<name>=<envvar>]
           <command> [<args>]

These are common Git commands used in various situations:

start a working area (see also: git help tutorial)
   clone     Clone a repository into a new directory
   init      Create an empty Git repository or reinitialize an existing one

work on the current change (see also: git help everyday)
   add       Add file contents to the index
   mv        Move or rename a file, a directory, or a symlink
   restore   Restore working tree files
   rm        Remove files from the working tree and from the index

examine the history and state (see also: git help revisions)
   bisect    Use binary search to find the commit that introduced a bug
   diff      Show changes between commits, commit and working tree, etc
   grep      Print lines matching a pattern
   log       Show commit logs
   show      Show various types of objects
   status    Show the working tree status

grow, mark and tweak your common history
   branch    List, create, or delete branches
   commit    Record changes to the repository
   merge     Join two or more development histories together
   rebase    Reapply commits on top of another base tip
   reset     Reset current HEAD to the specified state
   switch    Switch branches
   tag       Create, list, delete or verify a tag object signed with GPG

collaborate (see also: git help workflows)
   fetch     Download objects and refs from another repository
   pull      Fetch from and integrate with another repository or a local branch
   push      Update remote refs along with associated objects

'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.
See 'git help git' for an overview of the system.
Finishing: CmdLine

Is there anything in there which doesn’t seem right to you?
Happy to experiment and try alternative things to reach a resolution, but have run out of ideas…

Thanks,

Martin

Also, here is the full output from the Analyze step incase there’s something else that’s helpful in there…


2022-08-11T12:45:01.2069933Z ##[section]Starting: SonarCloudAnalyze
2022-08-11T12:45:01.2266514Z ==============================================================================
2022-08-11T12:45:01.2266975Z Task         : Run Code Analysis
2022-08-11T12:45:01.2267518Z Description  : Run scanner and upload the results to the SonarCloud server.
2022-08-11T12:45:01.2267936Z Version      : 1.32.0
2022-08-11T12:45:01.2268185Z Author       : sonarsource
2022-08-11T12:45:01.2270309Z Help         : Version: 1.32.0. This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.

[More Information](https://docs.sonarcloud.io/advanced-setup/ci-based-analysis/sonarscanner-for-azure-devops/)
2022-08-11T12:45:01.2272347Z ==============================================================================
2022-08-11T12:45:01.5726636Z [command]D:\a\_tasks\SonarCloudPrepare_14d9cde6-c1da-4d55-aa01-2965cd301255\1.29.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe end
2022-08-11T12:45:01.6485477Z SonarScanner for MSBuild 5.7.2
2022-08-11T12:45:01.6490658Z Using the .NET Framework version of the Scanner for MSBuild
2022-08-11T12:45:01.7149809Z Post-processing started.
2022-08-11T12:45:01.8924094Z Calling the TFS Processor executable...
2022-08-11T12:45:02.0790142Z Attempting to locate the CodeCoverage.exe tool...
2022-08-11T12:45:02.0850232Z Attempting to locate the CodeCoverage.exe tool using setup configuration...
2022-08-11T12:45:02.1721306Z Code coverage command line tool: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Team Tools\Dynamic Code Coverage Tools\CodeCoverage.exe
2022-08-11T12:45:02.2029372Z Fetching code coverage report information from TFS...
2022-08-11T12:45:02.2054967Z Attempting to locate a test results (.trx) file...
2022-08-11T12:45:02.2168854Z Looking for TRX files in: D:\a\1\TestResults
2022-08-11T12:45:02.2189678Z No test results files found
2022-08-11T12:45:02.2254562Z Did not find any binary coverage files in the expected location.
2022-08-11T12:45:02.2268821Z Falling back on locating coverage files in the agent temp directory.
2022-08-11T12:45:02.2273687Z Searching for coverage files in D:\a\_temp
2022-08-11T12:45:02.2277987Z No coverage files found in the agent temp directory.
2022-08-11T12:45:02.2278974Z Coverage report conversion completed successfully.
2022-08-11T12:45:02.2364991Z The TFS Processor has finished
2022-08-11T12:45:02.2424251Z Calling the SonarScanner CLI...
2022-08-11T12:45:03.5536616Z INFO: Scanner configuration file: D:\a\_tasks\SonarCloudPrepare_14d9cde6-c1da-4d55-aa01-2965cd301255\1.29.0\classic-sonar-scanner-msbuild\sonar-scanner-4.7.0.2747\bin\..\conf\sonar-scanner.properties
2022-08-11T12:45:03.5560639Z INFO: Project root configuration file: D:\a\1\.sonarqube\out\sonar-project.properties
2022-08-11T12:45:03.7405614Z INFO: SonarScanner 4.7.0.2747
2022-08-11T12:45:03.7406260Z INFO: Java 11.0.16 Eclipse Adoptium (64-bit)
2022-08-11T12:45:03.7406661Z INFO: Windows Server 2022 10.0 amd64
2022-08-11T12:45:05.4523863Z INFO: User cache: C:\Users\VssAdministrator\.sonar\cache
2022-08-11T12:45:08.3167927Z INFO: Scanner configuration file: D:\a\_tasks\SonarCloudPrepare_14d9cde6-c1da-4d55-aa01-2965cd301255\1.29.0\classic-sonar-scanner-msbuild\sonar-scanner-4.7.0.2747\bin\..\conf\sonar-scanner.properties
2022-08-11T12:45:08.3169918Z INFO: Project root configuration file: D:\a\1\.sonarqube\out\sonar-project.properties
2022-08-11T12:45:08.3213940Z INFO: Analyzing on SonarCloud
2022-08-11T12:45:08.3215535Z INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
2022-08-11T12:45:10.3706906Z INFO: Load global settings
2022-08-11T12:45:10.6936961Z INFO: Load global settings (done) | time=328ms
2022-08-11T12:45:10.7096722Z INFO: Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
2022-08-11T12:45:11.2612719Z INFO: User cache: C:\Users\VssAdministrator\.sonar\cache
2022-08-11T12:45:11.2771460Z INFO: Load/download plugins
2022-08-11T12:45:11.2775861Z INFO: Load plugins index
2022-08-11T12:45:12.0890507Z INFO: Load plugins index (done) | time=814ms
2022-08-11T12:45:18.6627728Z INFO: Load/download plugins (done) | time=7389ms
2022-08-11T12:45:20.3779985Z INFO: Loaded core extensions: developer-scanner
2022-08-11T12:45:21.6206142Z INFO: Found an active CI vendor: 'Azure DevOps'
2022-08-11T12:45:21.6624082Z INFO: Load project settings for component key: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
2022-08-11T12:45:21.8542983Z INFO: Load project settings for component key: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_MacTest' (done) | time=191ms
2022-08-11T12:45:21.8682519Z INFO: Process project properties
2022-08-11T12:45:21.8841320Z INFO: Execute project builders
2022-08-11T12:45:22.3756384Z INFO: Execute project builders (done) | time=485ms
2022-08-11T12:45:22.3900877Z INFO: Project key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_MacTest
2022-08-11T12:45:22.3901690Z INFO: Base dir: D:\a\1\s
2022-08-11T12:45:22.3902224Z INFO: Working dir: D:\a\1\.sonarqube\out\.sonar
2022-08-11T12:45:22.6620554Z INFO: Load project branches
2022-08-11T12:45:22.8448133Z INFO: Load project branches (done) | time=172ms
2022-08-11T12:45:22.8487085Z INFO: Check ALM binding of project 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_MacTest'
2022-08-11T12:45:23.0223779Z INFO: Detected project binding: NOT_BOUND
2022-08-11T12:45:23.0224922Z INFO: Check ALM binding of project 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_MacTest' (done) | time=172ms
2022-08-11T12:45:23.0254689Z INFO: Load project pull requests
2022-08-11T12:45:23.1786895Z INFO: Load project pull requests (done) | time=156ms
2022-08-11T12:45:23.1822926Z INFO: Load branch configuration
2022-08-11T12:45:23.1856451Z INFO: Load branch configuration (done) | time=0ms
2022-08-11T12:45:23.2507404Z INFO: Load quality profiles
2022-08-11T12:45:23.6583317Z INFO: Load quality profiles (done) | time=410ms
2022-08-11T12:45:23.6673887Z INFO: Load active rules
2022-08-11T12:45:26.2131889Z INFO: Load active rules (done) | time=2532ms
2022-08-11T12:45:26.2983493Z INFO: Organization key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2022-08-11T12:45:26.3197008Z INFO: Load project repositories
2022-08-11T12:45:26.5773735Z INFO: Load project repositories (done) | time=266ms
2022-08-11T12:45:26.6651036Z INFO: Indexing files...
2022-08-11T12:45:26.6654466Z INFO: Project configuration:
2022-08-11T12:45:26.6664684Z INFO:   Excluded sources: **/build-wrapper-dump.json
2022-08-11T12:45:27.2708979Z INFO: Indexing files of module 'ProjectOne'
2022-08-11T12:45:27.2711732Z INFO:   Base dir: D:\a\1\s\ExampleOne\ProjectOne
2022-08-11T12:45:27.2712715Z INFO:   Source paths: Program.cs
2022-08-11T12:45:27.2713656Z INFO:   Excluded sources: **/build-wrapper-dump.json
2022-08-11T12:45:27.4263619Z INFO: Indexing files of module 'MacTest'
2022-08-11T12:45:27.4264434Z INFO:   Base dir: D:\a\1\s
2022-08-11T12:45:27.4265067Z INFO:   Excluded sources: **/build-wrapper-dump.json
2022-08-11T12:45:27.6052069Z INFO: 1 file indexed
2022-08-11T12:45:27.6054317Z INFO: 0 files ignored because of inclusion/exclusion patterns
2022-08-11T12:45:27.6096122Z INFO: 0 files ignored because of scm ignore settings
2022-08-11T12:45:27.6097467Z INFO: Quality profile for cs: Commerce
2022-08-11T12:45:29.2936014Z INFO: ------------- Run sensors on module ProjectOne
2022-08-11T12:45:29.5957295Z INFO: Load metrics repository
2022-08-11T12:45:29.8077297Z INFO: Load metrics repository (done) | time=203ms
2022-08-11T12:45:36.2163931Z INFO: Sensor C# Project Type Information [csharp]
2022-08-11T12:45:36.2178045Z INFO: Sensor C# Project Type Information [csharp] (done) | time=0ms
2022-08-11T12:45:36.2182881Z INFO: Sensor C# Analysis Log [csharp]
2022-08-11T12:45:36.2417090Z INFO: Roslyn version: 4.2.0.0
2022-08-11T12:45:36.2418877Z INFO: Language version: CSharp10
2022-08-11T12:45:36.2420429Z INFO: Concurrent execution: enabled
2022-08-11T12:45:36.2421586Z INFO: Sensor C# Analysis Log [csharp] (done) | time=31ms
2022-08-11T12:45:36.2422558Z INFO: Sensor C# Properties [csharp]
2022-08-11T12:45:36.2534926Z INFO: Sensor C# Properties [csharp] (done) | time=0ms
2022-08-11T12:45:36.2537675Z INFO: Sensor HTML [web]
2022-08-11T12:45:36.2540620Z INFO: Sensor HTML [web] (done) | time=0ms
2022-08-11T12:45:36.2543483Z INFO: Sensor Text Sensor [text]
2022-08-11T12:45:36.2552975Z INFO: 1 source file to be analyzed
2022-08-11T12:45:36.2695198Z INFO: 1/1 source file has been analyzed
2022-08-11T12:45:36.2696514Z INFO: Sensor Text Sensor [text] (done) | time=16ms
2022-08-11T12:45:36.2701151Z INFO: Sensor VB.NET Project Type Information [vbnet]
2022-08-11T12:45:36.2725055Z INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=0ms
2022-08-11T12:45:36.2726671Z INFO: Sensor VB.NET Analysis Log [vbnet]
2022-08-11T12:45:36.3005289Z INFO: Sensor VB.NET Analysis Log [vbnet] (done) | time=16ms
2022-08-11T12:45:36.3007262Z INFO: Sensor VB.NET Properties [vbnet]
2022-08-11T12:45:36.3008258Z INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms
2022-08-11T12:45:36.3009203Z INFO: Sensor JaCoCo XML Report Importer [jacoco]
2022-08-11T12:45:36.3053356Z INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
2022-08-11T12:45:36.3100112Z INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
2022-08-11T12:45:36.3101982Z INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=16ms
2022-08-11T12:45:36.3114083Z INFO: Sensor CSS Rules [javascript]
2022-08-11T12:45:36.3118568Z INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
2022-08-11T12:45:36.3119989Z INFO: Sensor CSS Rules [javascript] (done) | time=0ms
2022-08-11T12:45:36.3121095Z INFO: Sensor ThymeLeaf template sensor [securityjavafrontend]
2022-08-11T12:45:36.3133287Z INFO: Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=0ms
2022-08-11T12:45:36.3139631Z INFO: Sensor Serverless configuration file sensor [security]
2022-08-11T12:45:36.3148828Z INFO: 0 Serverless function entries were found in the project
2022-08-11T12:45:36.3269518Z INFO: 0 Serverless function handlers were kept as entrypoints
2022-08-11T12:45:36.3277288Z INFO: Sensor Serverless configuration file sensor [security] (done) | time=15ms
2022-08-11T12:45:36.3282047Z INFO: Sensor AWS SAM template file sensor [security]
2022-08-11T12:45:36.3295085Z INFO: Sensor AWS SAM template file sensor [security] (done) | time=0ms
2022-08-11T12:45:36.3348240Z INFO: ------------- Run sensors on module MacTest
2022-08-11T12:45:36.6039094Z INFO: Sensor C# Project Type Information [csharp]
2022-08-11T12:45:36.6044741Z INFO: Sensor C# Project Type Information [csharp] (done) | time=0ms
2022-08-11T12:45:36.6051947Z INFO: Sensor C# Analysis Log [csharp]
2022-08-11T12:45:36.6062214Z INFO: Sensor C# Analysis Log [csharp] (done) | time=0ms
2022-08-11T12:45:36.6064442Z INFO: Sensor C# Properties [csharp]
2022-08-11T12:45:36.6065177Z INFO: Sensor C# Properties [csharp] (done) | time=0ms
2022-08-11T12:45:36.6065763Z INFO: Sensor Text Sensor [text]
2022-08-11T12:45:36.6104788Z INFO: 0 source files to be analyzed
2022-08-11T12:45:36.6108896Z INFO: 0/0 source files have been analyzed
2022-08-11T12:45:36.6111751Z INFO: Sensor Text Sensor [text] (done) | time=0ms
2022-08-11T12:45:36.6117494Z INFO: Sensor VB.NET Project Type Information [vbnet]
2022-08-11T12:45:36.6133247Z INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=0ms
2022-08-11T12:45:36.6134117Z INFO: Sensor VB.NET Analysis Log [vbnet]
2022-08-11T12:45:36.6134870Z INFO: Sensor VB.NET Analysis Log [vbnet] (done) | time=0ms
2022-08-11T12:45:36.6156941Z INFO: Sensor VB.NET Properties [vbnet]
2022-08-11T12:45:36.6157620Z INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms
2022-08-11T12:45:36.6160446Z INFO: Sensor JaCoCo XML Report Importer [jacoco]
2022-08-11T12:45:36.6161658Z INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
2022-08-11T12:45:36.6163222Z INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
2022-08-11T12:45:36.6172839Z INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=0ms
2022-08-11T12:45:36.6174074Z INFO: Sensor CSS Rules [javascript]
2022-08-11T12:45:36.6174802Z INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
2022-08-11T12:45:36.6175513Z INFO: Sensor CSS Rules [javascript] (done) | time=0ms
2022-08-11T12:45:36.6176153Z INFO: Sensor ThymeLeaf template sensor [securityjavafrontend]
2022-08-11T12:45:36.6176860Z INFO: Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=0ms
2022-08-11T12:45:36.6316727Z INFO: Sensor Serverless configuration file sensor [security]
2022-08-11T12:45:36.6318718Z INFO: 0 Serverless function entries were found in the project
2022-08-11T12:45:36.6325403Z INFO: 0 Serverless function handlers were kept as entrypoints
2022-08-11T12:45:36.6327648Z INFO: Sensor Serverless configuration file sensor [security] (done) | time=0ms
2022-08-11T12:45:36.6329547Z INFO: Sensor AWS SAM template file sensor [security]
2022-08-11T12:45:36.6330640Z INFO: Sensor AWS SAM template file sensor [security] (done) | time=0ms
2022-08-11T12:45:36.6348832Z INFO: Sensor javabugs [dbd]
2022-08-11T12:45:36.6350061Z INFO: Reading IR files from: D:\a\1\.sonarqube\out\.sonar\ir\java
2022-08-11T12:45:36.6351070Z INFO: No IR files have been included for analysis.
2022-08-11T12:45:36.6352048Z INFO: Sensor javabugs [dbd] (done) | time=0ms
2022-08-11T12:45:36.6352960Z INFO: Sensor pythonbugs [dbd]
2022-08-11T12:45:36.6353908Z INFO: Reading IR files from: D:\a\1\.sonarqube\out\.sonar\ir\python
2022-08-11T12:45:36.6354984Z INFO: No IR files have been included for analysis.
2022-08-11T12:45:36.6355992Z INFO: Sensor pythonbugs [dbd] (done) | time=0ms
2022-08-11T12:45:36.6390640Z INFO: Sensor JavaSecuritySensor [security]
2022-08-11T12:45:36.6391964Z INFO: Reading type hierarchy from: D:\a\1\.sonarqube\out\.sonar\ucfg2\java
2022-08-11T12:45:36.6393025Z INFO: Read 0 type definitions
2022-08-11T12:45:36.6419617Z INFO: Reading UCFGs from: D:\a\1\.sonarqube\out\.sonar\ucfg2\java
2022-08-11T12:45:36.6430020Z INFO: No UCFGs have been included for analysis.
2022-08-11T12:45:36.6431224Z INFO: Sensor JavaSecuritySensor [security] (done) | time=16ms
2022-08-11T12:45:36.6439755Z INFO: Sensor CSharpSecuritySensor [security]
2022-08-11T12:45:36.6441289Z INFO: Reading type hierarchy from: D:\a\1\.sonarqube\out\ucfg_cs2
2022-08-11T12:45:36.7766974Z INFO: Read 1 type definitions
2022-08-11T12:45:36.7844274Z INFO: Reading UCFGs from: D:\a\1\.sonarqube\out\ucfg_cs2
2022-08-11T12:45:36.7857419Z INFO: No UCFGs have been included for analysis.
2022-08-11T12:45:36.7864411Z INFO: Sensor CSharpSecuritySensor [security] (done) | time=140ms
2022-08-11T12:45:36.7866211Z INFO: Sensor PhpSecuritySensor [security]
2022-08-11T12:45:36.7866962Z INFO: Reading type hierarchy from: D:\a\1\.sonarqube\out\.sonar\ucfg2\php
2022-08-11T12:45:36.7868874Z INFO: Read 0 type definitions
2022-08-11T12:45:36.7869909Z INFO: Reading UCFGs from: D:\a\1\.sonarqube\out\.sonar\ucfg2\php
2022-08-11T12:45:36.7870562Z INFO: No UCFGs have been included for analysis.
2022-08-11T12:45:36.7874625Z INFO: Sensor PhpSecuritySensor [security] (done) | time=0ms
2022-08-11T12:45:36.7876245Z INFO: Sensor PythonSecuritySensor [security]
2022-08-11T12:45:36.7880429Z INFO: Reading type hierarchy from: D:\a\1\.sonarqube\out\.sonar\ucfg2\python
2022-08-11T12:45:36.7881150Z INFO: Read 0 type definitions
2022-08-11T12:45:36.7881827Z INFO: Reading UCFGs from: D:\a\1\.sonarqube\out\.sonar\ucfg2\python
2022-08-11T12:45:36.7885036Z INFO: No UCFGs have been included for analysis.
2022-08-11T12:45:36.7885694Z INFO: Sensor PythonSecuritySensor [security] (done) | time=0ms
2022-08-11T12:45:36.7886368Z INFO: Sensor JsSecuritySensor [security]
2022-08-11T12:45:36.7887848Z INFO: Reading type hierarchy from: D:\a\1\.sonarqube\out\.sonar\ucfg2\js
2022-08-11T12:45:36.7896350Z INFO: Read 0 type definitions
2022-08-11T12:45:36.7897730Z INFO: Reading UCFGs from: D:\a\1\.sonarqube\out\.sonar\ucfg2\js
2022-08-11T12:45:36.7898780Z INFO: No UCFGs have been included for analysis.
2022-08-11T12:45:36.7899824Z INFO: Sensor JsSecuritySensor [security] (done) | time=16ms
2022-08-11T12:45:36.7900770Z INFO: ------------- Run sensors on project
2022-08-11T12:45:36.9307817Z INFO: Sensor C# [csharp]
2022-08-11T12:45:36.9519641Z INFO: Importing results from 6 proto files in 'D:\a\1\.sonarqube\out\0\output-cs'
2022-08-11T12:45:37.2013755Z INFO: Importing 1 Roslyn report
2022-08-11T12:45:37.2699166Z INFO: Found 1 MSBuild C# project: 1 MAIN project.
2022-08-11T12:45:37.2699993Z INFO: Sensor C# [csharp] (done) | time=328ms
2022-08-11T12:45:37.2700541Z INFO: Sensor Analysis Warnings import [csharp]
2022-08-11T12:45:37.2734726Z INFO: Sensor Analysis Warnings import [csharp] (done) | time=15ms
2022-08-11T12:45:37.2735517Z INFO: Sensor Zero Coverage Sensor
2022-08-11T12:45:37.3147664Z INFO: Sensor Zero Coverage Sensor (done) | time=32ms
2022-08-11T12:45:37.3231239Z INFO: SCM Publisher SCM provider for this project is: git
2022-08-11T12:45:37.3317180Z INFO: SCM Publisher 1 source file to be analyzed
2022-08-11T12:45:37.5785093Z INFO: Blaming files using native implementation
2022-08-11T12:45:37.6793600Z INFO: Blaming files using native implementation (done) | time=93ms
2022-08-11T12:45:37.6936659Z INFO: SCM Publisher 0/1 source files have been analyzed (done) | time=368ms
2022-08-11T12:45:37.6942330Z WARN: Missing blame information for the following files:
2022-08-11T12:45:37.6943590Z WARN:   * ExampleOne/ProjectOne/Program.cs
2022-08-11T12:45:37.6944943Z WARN: This may lead to missing/broken features in SonarCloud
2022-08-11T12:45:37.6982428Z INFO: CPD Executor Calculating CPD for 1 file
2022-08-11T12:45:37.7116619Z INFO: CPD Executor CPD calculation finished (done) | time=14ms
2022-08-11T12:45:40.2584064Z INFO: Analysis report generated in 2550ms, dir size=193 KB
2022-08-11T12:45:40.2868913Z INFO: Analysis report compressed in 31ms, zip size=37 KB
2022-08-11T12:45:40.5529919Z INFO: Analysis report uploaded in 250ms
2022-08-11T12:45:40.5538478Z INFO: ANALYSIS SUCCESSFUL, you can find the results at: https://sonarcloud.io/dashboard?id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_MacTest
2022-08-11T12:45:40.5540569Z INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
2022-08-11T12:45:40.5541908Z INFO: More about the report processing at https://sonarcloud.io/api/ce/task?id=AYKM8GMHiBllNo_1f_9M
2022-08-11T12:45:40.5542982Z INFO: Analysis total time: 20.177 s
2022-08-11T12:45:40.6002115Z INFO: ------------------------------------------------------------------------
2022-08-11T12:45:40.6004209Z INFO: EXECUTION SUCCESS
2022-08-11T12:45:40.6010088Z INFO: ------------------------------------------------------------------------
2022-08-11T12:45:40.6012000Z INFO: Total time: 37.039s
2022-08-11T12:45:40.7214092Z INFO: Final Memory: 35M/120M
2022-08-11T12:45:40.7216033Z INFO: ------------------------------------------------------------------------
2022-08-11T12:45:41.3298792Z The SonarScanner CLI has finished
2022-08-11T12:45:41.3305900Z 12:45:41.327  Post-processing succeeded.
2022-08-11T12:45:41.3628031Z ##[section]Finishing: SonarCloudAnalyze

Hi Martin,

Just to be explicit, there is a .git (sub)directory where build/analysis runs from?

 
Ann

Good question… This is all building on a microsoft hosted machine, so it’s a bit tricky to poke around.
From the log files, it appears that the code comes out to here

D:\a\1\s.git

I’m trying to figure out from the output log I pasted, exactly what folder it’s in when it’s running the analysis/build…

1 Like

The Build step output quotes this at the start :

Starting: VSBuild
==============================================================================
Task         : Visual Studio build
Description  : Build with MSBuild and set the Visual Studio version property
Version      : 1.199.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/visual-studio-build
==============================================================================
"D:\a\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.199.0\ps_modules\MSBuildHelpers\vswhere.exe" -version [17.0,18.0) -latest -format json
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\msbuild.exe" "D:\a\1\s\ExampleOne\ExampleOne.sln" /nologo /nr:false /dl:CentralLogger,"D:\a\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.199.0\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll";"RootDetailId=8052e0b6-66fb-4e00-8554-df846bc4cb7a|SolutionDir=D:\a\1\s\ExampleOne|enableOrphanedProjectsLogs=true"*ForwardingLogger,"D:\a\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.199.0\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll" /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="D:\a\1\a\WebApp.zip" /p:DeployIisAppPath="Default Web Site" /p:platform="Any CPU" /p:configuration="Release" /p:VisualStudioVersion="17.0" /p:_MSDeployUserAgent="VSTS_c1cabbcf-eec3-4e11-9423-c9702e27d7b4_build_362_0"
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
Build started 8/11/2022 12:44:50 PM.
Project "D:\a\1\s\ExampleOne\ExampleOne.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
  Building solution configuration "Release|Any CPU".
Project "D:\a\1\s\ExampleOne\ExampleOne.sln" (1) is building "D:\a\1\s\ExampleOne\ProjectOne\ProjectOne.csproj" (2) on node 1 (default targets).
PrepareForBuild:
  Creating directory "bin\Release\net6.0\".
  Creating directory "obj\Release\net6.0\".
  Creating directory "D:\a\1\s\ExampleOne\ProjectOne\obj\Release\net6.0\refint\".
  Creating directory "obj\Release\net6.0\ref".
SonarCategoriseProject:
  Sonar: (ProjectOne.csproj) Categorizing project as test or product code...
  Sonar: (ProjectOne.csproj) categorized as MAIN project (production code).
SonarCreateProjectSpecificDirs:
  Creating directory "D:\a\1\.sonarqube\conf\0".
SonarWriteFilesToAnalyze:
  Sonar: (ProjectOne.csproj) Number of files to analyse: 2. The list of files to be analyzed is in D:\a\1\.sonarqube\conf\0\FilesToAnalyze.txt.
SetRoslynCodeAnalysisProperties:
  Sonar: (ProjectOne.csproj) Analysis configured successfully with D:\a\1\.sonarqube\conf\0\SonarProjectConfig.xml.
SonarQubeImportBeforeInfo:
  Sonar: (ProjectOne) SonarQube.Integration.ImportBefore.targets was loaded
CoreCompile:
  C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\Roslyn\csc.exe /noconfig /unsafe- /checked- /nowarn:1701,1702,1701,1702 /fullpaths /nostdlib+ /errorreport:prompt /warn:4 /define:TRACE;RELEASE;NET;NET6_0;NETCOREAPP;NET5_0_OR_GREATER;NET6_0_OR_GREATER;NETCOREAPP1_0_OR_GREATER;NETCOREAPP1_1_OR_GREATER;NETCOREAPP2_0_OR_GREATER;NETCOREAPP2_1_OR_GREATER;NETCOREAPP2_2_OR_GREATER;NETCOREAPP3_0_OR_GREATER;NETCOREAPP3_1_OR_GREATER /highentropyva+ /nullable:enable /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\Microsoft.CSharp.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\Microsoft.VisualBasic.Core.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\Microsoft.VisualBasic.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\Microsoft.Win32.Primitives.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\Microsoft.Win32.Registry.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\mscorlib.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\netstandard.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.AppContext.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Buffers.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Collections.Concurrent.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Collections.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Collections.Immutable.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Collections.NonGeneric.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Collections.Specialized.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.ComponentModel.Annotations.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.ComponentModel.DataAnnotations.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.ComponentModel.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.ComponentModel.EventBasedAsync.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.ComponentModel.Primitives.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.ComponentModel.TypeConverter.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Configuration.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Console.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Core.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Data.Common.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Data.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Diagnostics.Contracts.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Diagnostics.Debug.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Diagnostics.DiagnosticSource.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Diagnostics.FileVersionInfo.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Diagnostics.Process.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Diagnostics.StackTrace.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Diagnostics.TextWriterTraceListener.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Diagnostics.Tools.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Diagnostics.TraceSource.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Diagnostics.Tracing.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Drawing.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Drawing.Primitives.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Dynamic.Runtime.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Formats.Asn1.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Globalization.Calendars.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Globalization.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Globalization.Extensions.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.IO.Compression.Brotli.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.IO.Compression.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.IO.Compression.FileSystem.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.IO.Compression.ZipFile.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.IO.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.IO.FileSystem.AccessControl.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.IO.FileSystem.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.IO.FileSystem.DriveInfo.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.IO.FileSystem.Primitives.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.IO.FileSystem.Watcher.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.IO.IsolatedStorage.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.IO.MemoryMappedFiles.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.IO.Pipes.AccessControl.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.IO.Pipes.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.IO.UnmanagedMemoryStream.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Linq.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Linq.Expressions.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Linq.Parallel.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Linq.Queryable.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Memory.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Net.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Net.Http.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Net.Http.Json.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Net.HttpListener.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Net.Mail.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Net.NameResolution.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Net.NetworkInformation.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Net.Ping.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Net.Primitives.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Net.Requests.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Net.Security.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Net.ServicePoint.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Net.Sockets.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Net.WebClient.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Net.WebHeaderCollection.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Net.WebProxy.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Net.WebSockets.Client.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Net.WebSockets.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Numerics.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Numerics.Vectors.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.ObjectModel.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Reflection.DispatchProxy.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Reflection.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Reflection.Emit.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Reflection.Emit.ILGeneration.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Reflection.Emit.Lightweight.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Reflection.Extensions.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Reflection.Metadata.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Reflection.Primitives.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Reflection.TypeExtensions.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Resources.Reader.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Resources.ResourceManager.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Resources.Writer.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Runtime.CompilerServices.Unsafe.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Runtime.CompilerServices.VisualC.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Runtime.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Runtime.Extensions.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Runtime.Handles.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Runtime.InteropServices.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Runtime.InteropServices.RuntimeInformation.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Runtime.Intrinsics.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Runtime.Loader.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Runtime.Numerics.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Runtime.Serialization.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Runtime.Serialization.Formatters.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Runtime.Serialization.Json.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Runtime.Serialization.Primitives.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Runtime.Serialization.Xml.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Security.AccessControl.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Security.Claims.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Security.Cryptography.Algorithms.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Security.Cryptography.Cng.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Security.Cryptography.Csp.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Security.Cryptography.Encoding.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Security.Cryptography.OpenSsl.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Security.Cryptography.Primitives.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Security.Cryptography.X509Certificates.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Security.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Security.Principal.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Security.Principal.Windows.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Security.SecureString.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.ServiceModel.Web.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.ServiceProcess.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Text.Encoding.CodePages.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Text.Encoding.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Text.Encoding.Extensions.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Text.Encodings.Web.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Text.Json.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Text.RegularExpressions.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Threading.Channels.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Threading.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Threading.Overlapped.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Threading.Tasks.Dataflow.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Threading.Tasks.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Threading.Tasks.Extensions.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Threading.Tasks.Parallel.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Threading.Thread.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Threading.ThreadPool.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Threading.Timer.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Transactions.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Transactions.Local.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.ValueTuple.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Web.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Web.HttpUtility.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Windows.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Xml.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Xml.Linq.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Xml.ReaderWriter.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Xml.Serialization.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Xml.XDocument.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Xml.XmlDocument.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Xml.XmlSerializer.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Xml.XPath.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\System.Xml.XPath.XDocument.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\ref\net6.0\WindowsBase.dll" /debug- /debug:portable /filealign:512 /optimize+ /out:obj\Release\net6.0\ProjectOne.dll /refout:obj\Release\net6.0\refint\ProjectOne.dll /ruleset:D:\a\1\.sonarqube\conf\Sonar-cs.ruleset /errorlog:D:\a\1\.sonarqube\out\0\Issues.json /target:exe /warnaserror- /utf8output /deterministic+ /langversion:10.0 /analyzerconfig:obj\Release\net6.0\ProjectOne.GeneratedMSBuildEditorConfig.editorconfig /analyzerconfig:"C:\Program Files\dotnet\sdk\6.0.302\Sdks\Microsoft.NET.Sdk\analyzers\build\config\analysislevel_6_default.editorconfig" /analyzer:C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\0\Google.Protobuf.dll /analyzer:C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\0\SonarAnalyzer.CFG.dll /analyzer:C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\0\SonarAnalyzer.CSharp.dll /analyzer:C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\0\SonarAnalyzer.dll /analyzer:C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\1\Google.Protobuf.dll /analyzer:C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\1\SonarAnalyzer.CFG.dll /analyzer:C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\1\SonarAnalyzer.dll /analyzer:C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\1\SonarAnalyzer.VisualBasic.dll /analyzer:C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\2\Microsoft.AspNetCore.Razor.Language.dll /analyzer:C:\Users\VssAdministrator\AppData\Local\Temp\.sonarqube\resources\2\SonarAnalyzer.Security.dll /analyzer:"C:\Program Files\dotnet\sdk\6.0.302\Sdks\Microsoft.NET.Sdk\targets\..\analyzers\Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll" /analyzer:"C:\Program Files\dotnet\sdk\6.0.302\Sdks\Microsoft.NET.Sdk\targets\..\analyzers\Microsoft.CodeAnalysis.NetAnalyzers.dll" /analyzer:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.7\analyzers/dotnet/cs/System.Text.Json.SourceGeneration.dll" /additionalfile:D:\a\1\.sonarqube\conf\cs\SonarLint.xml /additionalfile:D:\a\1\.sonarqube\conf\0\SonarProjectConfig.xml /additionalfile:D:\a\1\.sonarqube\conf\0\ProjectOutFolderPath.txt Program.cs obj\Release\net6.0\ProjectOne.GlobalUsings.g.cs "obj\Release\net6.0\.NETCoreApp,Version=v6.0.AssemblyAttributes.cs" obj\Release\net6.0\ProjectOne.AssemblyInfo.cs


Hi,

I think this means analysis root is D:\a\1 & so the .git directory isn’t in project root (which is what the error implies)

 
Ann

Hi again,

I have confirmation that SonarScanner for .NET creates the .sonarqube folder in the directory where it was executed.

The assumption is that analysis is kicked off from project root (where the .git directory would naturally be), so that’s what’s going wrong here.

 
Ann

Aha… That’s great info, thankyou.
I’ll see if I can force a directory change before the build step & let you know how that goes.

Thanks!
Martin

1 Like

So from the looks of it (when I switch on diagnostic trace), the creation of the .sonarqube folder happens in the SonarCloudPrepare step (the Sonar extension in Azure DevOps Marketplace).
I can’t see any way to change the location which it’s running from, except possible the “sonar.projectBaseDir” property perhaps?

I’ve been trying various permutations of this for the past hour, but i can’t make anything change about the location it’s running from & no signs from the trace that it’s actually using this property for anything. (see below for how I’ve tried updating the YAML most recently).

Since this is a clean new build pipeline on Azure DevOps, using the SonarCloud extensions from the Marketplace — is there some guide to how this is meant to be set up exactly? I’ve followed the steps on the page here : SonarScanner for Azure DevOps | SonarCloud Docs
But it just leaves me in the current position… Does anyone actually use SonarCloud integrated with Azure DevOps?

- task: SonarCloudPrepare@1
  inputs:
    SonarCloud: 'sonarcloud'
    organization: 'xxxxxxxxxxxxxx'
    scannerMode: 'MSBuild'
    projectKey: 'xxxxxxxxxxxxxxxx_MacTest'
    projectName: 'MacTest'
    projectVersion: $(Build.BuildNumber)
    extraProperties: |
      sonar.projectBaseDir=d:/a/1/s

Hi Martin,

Would it be possible to post or point to your full pipeline log?

 
Ann

If you can contact me by email, I’m happy to email over the full diagnostic logs of all the steps.
I can do a screenshare if it’d help to see it 1st hand and try anything too.

Hi Martin,

That’s not something we do.

 
Ann

Ok I’ll have to run through the logs and clean all the reference keys out then before I can post them publicly.
Will do that tonight and upload somewhere.

1 Like

Hi,

We are still investigating this issue. So far, it seems to happen only on Windows agents, and not on Linux agents.
I’ll keep you posted.

HTH,
Claire

1 Like

Thanks for the update Claire!

regards,

Martin

It is happening here as well … I attempted committing everything again (by “touching” the 11 files it is happening to here). No change.

Thanks for the update Claire