Excluding files in sonar scanner

Hi all,
Version - Community Build v25.5.0.107428
Deployed - ZIP
Trying to exclude files from scanning

The problem itself is -

Error during SonarScanner execution
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'ClassRealm{iac}-org.sonar.iac.helm.HelmEvaluator': Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'AnalysisTempFolder' defined in org.sonar.scanner.analysis.AnalysisTempFolderProvider: Unsatisfied dependency expressed through method 'provide' parameter 0: Error creating bean with name 'DefaultInputProject' defined in org.sonar.scanner.scan.InputProjectProvider: Unsatisfied dependency expressed through method 'provide' parameter 2: Error creating bean with name 'ProjectReactor' defined in org.sonar.scanner.scan.MutableProjectReactorProvider: Failed to instantiate [org.sonar.api.batch.bootstrap.ProjectReactor]: Factory method 'provide' threw exception with message: Malformed input or input contains unmappable characters: /src/backend/src/Auth.UnitTests/Files/??_xlsx.txt

The problem is in the files, there are Cyrillic characters there, the scanner cannot analyze them, the problem can be solved by deleting them, but I do not understand why exceptions do not work
How I tried to exclude these files:
> dotnet sonarscanner begin /d:sonar.global.exclusions=**/Files/**/* /d:sonar.token="$SONAR_TOKEN" etc then dotnet build and dotnet sonarscanner end /d:sonar.token="$SONAR_TOKEN"
I tried it like this /d:sonar.global.exclusions=**/Files/** and that sonar.exclusions=**/*.txt, does not work
Tried changing /src/.sonarqube/conf/SonarQubeAnalysisConfig.xml, tried in the sonarqube admin panel, nothing helps, maybe someone can help?

Hi,

Unfortunately, the SonarScanner for .NET handles exclusions a little differently. All the other scanners apply them on the front end, and… exclude the files. SonarScanner for .NET applies them on the back end, after having processed them anyway. (We know. It’s on the list.)

As a side note, when you’re applying exclusions on the command line, you should leave out the .global portion: sonar.exclusions=. Not that that will help here.

Your best option is to exclude the project from analysis, which should actually happen on the front end.

 
HTH,
Ann