# Last analysis failed Analysis ID "AY43Kg5eurEPEdsRa4aa"

**URL:** <https://community.sonarsource.com/t/last-analysis-failed-analysis-id-ay43kg5eurepedsra4aa/111107>\
**Category:** SonarQube Cloud\
**Tags:** autoscan\
**Created:** [March 13, 2024, 10:06am UTC](https://community.sonarsource.com/t/last-analysis-failed-analysis-id-ay43kg5eurepedsra4aa/111107 "2024-03-13T10:06:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![n-zaaijer-topicus](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/n-zaaijer-topicus/32/55387_2.png) [@n-zaaijer-topicus](https://community.sonarsource.com/u/n-zaaijer-topicus)\
**Post date:** [March 13, 2024, 10:06am UTC](https://community.sonarsource.com/t/last-analysis-failed-analysis-id-ay43kg5eurepedsra4aa/111107/1 "2024-03-13T10:06:29Z")

</div>

- ALM - GitHub
- CI system - Azure DevOps
- Automatic Analysis
- C#

Analysis keeps failing. No clue why. Can anyone provide more info?

---

<div class="post-metadata">

**Author:** ![eric.giffon](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/eric.giffon/32/72251_2.png) [@eric.giffon](https://community.sonarsource.com/u/eric.giffon)\
**Post date:** [March 21, 2024, 10:14am UTC](https://community.sonarsource.com/t/last-analysis-failed-analysis-id-ay43kg5eurepedsra4aa/111107/3 "2024-03-21T10:14:58Z")

</div>

Hello @n-zaaijer-topicus,

We took a look at the analysis and this is the error message returned:

```auto
File test/[...]/Helpers/XmlValidationHelper.cs can't be indexed twice. Please check that inclusion/exclusion patterns produce disjoint sets for main and test files

```

It seems that the automatic detection of source and test files is overlapping. You can try to force the values for the properties `sonar.sources` and `sonar.tests` manually in the `.sonarcloud.properties` file. See [documentation here](https://docs.sonarsource.com/sonarcloud/advanced-setup/automatic-analysis/#additional-analysis-configuration).  
And you can find more information on how to set these properties on [this page](https://docs.sonarsource.com/sonarcloud/advanced-setup/analysis-scope/).

---

<div class="post-metadata">

**Author:** ![n-zaaijer-topicus](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/n-zaaijer-topicus/32/55387_2.png) [@n-zaaijer-topicus](https://community.sonarsource.com/u/n-zaaijer-topicus)\
**Post date:** [March 26, 2024, 11:57am UTC](https://community.sonarsource.com/t/last-analysis-failed-analysis-id-ay43kg5eurepedsra4aa/111107/5 "2024-03-26T11:57:04Z")

</div>

Thanks for the reply.

I’ve managed to update the sonar.properties file and tried to exclude the Helpers folder. But now I’m getting another error code ‘AY56eNfpCs0hQG7upQg8’. I’ve tried to run things locally with a SonarQube docker container and I’m not getting any errors there. So I’m a bit confused.

This is my sonar.properties file.

```auto
# Path to sources
sonar.sources=src/[...]
#sonar.exclusions=
#sonar.inclusions=

# Path to tests
sonar.tests=test/[...]
sonar.test.exclusions=test/[...]/Helpers/**
#sonar.test.inclusions=

# Source encoding
sonar.sourceEncoding=UTF-8

# Exclusions for copy-paste detection
#sonar.cpd.exclusions=

```

---

<div class="post-metadata">

**Author:** ![eric.giffon](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/eric.giffon/32/72251_2.png) [@eric.giffon](https://community.sonarsource.com/u/eric.giffon)\
**Post date:** [March 26, 2024, 4:13pm UTC](https://community.sonarsource.com/t/last-analysis-failed-analysis-id-ay43kg5eurepedsra4aa/111107/6 "2024-03-26T16:13:22Z")

</div>

Thank you for trying this.  
The new error is similar to the previous one, but on a different file as the helpers are excluded.

```auto
ERROR: File test/[...]/TestSoapFactory.cs can't be indexed twice. Please check that inclusion/exclusion patterns produce disjoint sets for main and test files

```

So it looks like your configuration is correctly being picked up.

Could you try to run the analysis on SonarCloud with CI-based analysis (the same way you did on SonarQube) instead of using the automatic analysis? It would help us identify if the issue comes from SonarCloud as a whole or if it’s somehow related to automatic analysis.  
[Here](https://docs.sonarsource.com/sonarcloud/advanced-setup/ci-based-analysis/sonarscanner-for-net/) is the documentation if you need it.
