Your project contains C# files which cannot be analyzed with the scanner you are using

I’m using the .NET global tool dotnet-sonarscanner to run the analysis:

dotnet sonarscanner begin /k:"project-key"  /d:sonar.login="myAuthenticationToken" /d:"sonar.host.url"=http://localhost:9000
dotnet build 
dotnet sonarscanner end /d:sonar.login="myAuthenticationToken"

I’ve also asked this question on Stack Overflow where I already have some more info: c# - Failing SonarQube analysis on .NET Core 3.1 project - Stack Overflow.

Apparently having this setting in a Directory.Build.Targets file makes the analysis fail for at least some projects:

<Target Name="ChangeAliasesOfReactiveExtensions" BeforeTargets="FindReferenceAssembliesForReferences;ResolveReferences">
  <ItemGroup>
    <ReferencePath Condition="'%(FileName)' == 'System.Interactive.Async'">
      <Aliases>ix</Aliases>
    </ReferencePath>
  </ItemGroup>
</Target>

Removing this (and fixing the resulting build errors) still gives me the same warning when running it on the whole solution. So I know need to debug which project is giving problems and why that’s resulting in this warning.

Any pointers on how to do that or what could be the problem?