.NET Analysis always has warning "Architecture analysis executed with errors"

  • ALM used: Azure DevOps
  • CI system used: Azure DevOps
  • Scanner command used when applicable: SonarCloudAnalyze@4 (with scannerMode: 'dotnet' in SonarCloudPrepare@4)
  • Languages of the repository: C#, JSON, XML, YAML
  • Only if the SonarCloud project is public, the URL: private
  • Error observed: See below
  • Steps to reproduce: See below
  • Potential workaround: Unknown

Since Architecture Analysis was introduced some time ago all my .NET projects now show a warning for all analysis runs. The warning is:

Architecture analysis executed with errors. Analysis results may be incomplete or invalid.

How do I get rid of this warning? I do not want or need Architecture analysis.

Here are the log lines that contain the word “architecture” from the SonarCloudAnalyze@4 task of a sample run:

INFO: Loaded core extensions: a3s, architecture, sca
[...]
INFO: Sensor CSharpArchitectureSensor [architecture]
INFO: Found 1 potential Udg file location(s) for "cs" in "D:\a\1\.sonarqube\out"
INFO: - D:\a\1\.sonarqube\out\architecture\cs
INFO: Architecture analysis is enabled with the following features: legacy, discovery, flaws, smells, deviations, directives
INFO: * Protobuf reading starting | memory total=264 | free=123 | used=140 (MB)
INFO: * Reading SonarArchitecture UDG data from directory "D:\a\1\.sonarqube\out\architecture\cs"
WARNING: WARN: Skipping load of file: "D:\a\1\.sonarqube\out\architecture\cs\14.1.udg"
WARNING: WARN: Error raised: 'other' has different root
WARNING: WARN: Skipping load of file: "D:\a\1\.sonarqube\out\architecture\cs\15.1.udg"
WARNING: WARN: Error raised: 'other' has different root
WARNING: WARN: Skipping load of file: "D:\a\1\.sonarqube\out\architecture\cs\17.1.udg"
WARNING: WARN: Error raised: 'other' has different root
WARNING: WARN: Skipping load of file: "D:\a\1\.sonarqube\out\architecture\cs\18.1.udg"
WARNING: WARN: Error raised: 'other' has different root
WARNING: WARN: Skipping load of file: "D:\a\1\.sonarqube\out\architecture\cs\6.1.udg"
WARNING: WARN: Error raised: 'other' has different root
WARNING: WARN: Skipping load of file: "D:\a\1\.sonarqube\out\architecture\cs\7.1.udg"
WARNING: WARN: Error raised: 'other' has different root
WARNING: WARN: Skipping load of file: "D:\a\1\.sonarqube\out\architecture\cs\8.1.udg"
WARNING: WARN: Error raised: 'other' has different root
WARNING: WARN: Skipping load of file: "D:\a\1\.sonarqube\out\architecture\cs\9.1.udg"
WARNING: WARN: Error raised: 'other' has different root
INFO: * Files successfully loaded: "10" out of "18"
INFO: * Purging externals (components not scanned) from graphs
INFO: * Purging excluded nodes from graphs
INFO: * Protobuf reading complete | memory total=264 | free=116 | used=147 (MB)
INFO: * Build architecture.graph.cs.namespace_graph.default_perspective hierarchy graph complete (filtered=false) | memory total=264 | free=103 | used=160 (MB)
INFO: No directives configured
INFO: * No intended architecture defined or detected, using an empty model
INFO: Sensor CSharpArchitectureSensor [architecture] (done) | time=7201ms
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=8ms
INFO: Sensor Architecture Telemetry [architecture]
INFO: Sensor Architecture Telemetry [architecture] (done) | time=1ms
[...]
INFO: Successfully sent architecture data

Architecture scanning can be disabled with sonar.architecture.enable=false.

Good to know, thanks!

Assume I do want Architecture Analysis, how do I get rid of those errors/warnings?

Can you please add /d:sonar.verbose=true, send the debug log, and we will investigate. Thanks!

Thanks for the offer! But since I’m not sure if the full debug log contains any confidental information, I’d like to share it privately. How do I do that? It looks like the private message feature is disabled here?

Btw, I also checked your FAQ (linked at the top of the community page) about that question, but it also doesn’t answer how to share something privately.

Since I don’t know where to send private logs, I’ve now redacted the log. Please take a look at it:
Scanner Task Log.txt (1.2 MB)

Thanks @Manuel.P, we will investigate and come back to you.