Duplicate ProjectGuid for shared project reference

We have a build pipeline to analyse our entire source code with the SonarCloud build tasks in Azure DevOps. Our project used several shared common liberaries that are referenced in the application project files, however for 1 of the 7 shared common liberaries we get the following warning:

WARNING: Duplicate ProjectGuid: “8453c1d9-afa4-4f0b-bf68-362a66cbe247”. The project will not be analyzed by SonarQube. Project file: “D:\a\1\s\Common\Code\Common.Contracts\Common.Contracts.csproj”

How do we solve this, because when I search on the ProjectGuid it is unique in our complete source code.

Other common projects like “D:\a\1\s\Common\Code\Common.Services\Common.Services.csproj” with is used in the same places as Common.Contract does not throws any warnings.

SonarCloud private
SonarScanner for MSBuild 4.6.2

Hi Youri,

Sorry for the late reply,

Is this project not analyzed at all ? Or you can see some issue/codesmell/coverage anyway in the analysis ?

This warning occurs if your project is referenced more than once in your solution (which is your case). We are doing so to ensure consistently sending of metrics from the same configuration so we sort the project outputs and use only the first one for metrics.

Mickaël

Hi Mickaël,

This project is not analyzed at all by SonarCloud.

We have several Common projects that are used in the application solutions as shared references on the same way as the project. All other Common projects are analyzed by SonarCloud except this one.

Youri

@mickaelcaro any idea’s or suggestions?

We have solved this issue. In several project and solution files there was a different typing (one letter was in some cases in Uppercase, so DMi vs DMI) of the path and the same project reference was used. SonarCloud is apparently case sensitive. Fixed all the path to the same casing and problem is solved.

1 Like