Repo: Azure DevOps
CI system: TeamCity, PowerShell script
Scanner: dotnet sonarscanner (SonarScanner for MSBuild 8.0.2)
.NET
Hi there!
A customer of us has this .NET repository and they have at the root of the project a .sln and a .csproj for one of the modules.
I cannot do any modifications to the repo and I have to analyze it. Sonar is giving this message:
'Specify which project file to use because this xxxxxxx(working directory) contains more than one project.‘
I have checked the docs and we do not have any parameter in order to specify which file is the project descriptor.
How do I proceed?
Regards,
Colin
(Colin)
November 11, 2025, 8:47am
2
Hey there.
This is a known issue – SCAN4NET-604
As noted in the ticket:
Known workarounds
Use SonarScanner.MSBuild.exe or dotnet sonarscanner.msbuild.dll to run the begin step, OR Create a solution that references the projects and build the solution.
Hi, Colin:
Thank you for the quick response.
As per the ticket I understand this is a problem with MsBuild and not Sonar Scanner itself, so we can’t expect to have this fixed for a while. Am I right?
Colin
(Colin)
November 11, 2025, 10:06am
4
1 Like
system
(system)
Closed
November 18, 2025, 10:06am
5
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.