1

My Sonarqube analysis of a dotnet core solution in TFS2017 fails, because of 'duplicate project guids'. This is undoubtedly because dotnet core projects do not have a project guid. However I cannot make Sonarqube understand that I doesn't have to search for a project guid. How do I correct this problem?

Here is the logging from the TFS build process:

 2018-08-30T09:31:42.5330000Z C:\Build2017\1\s\XXXXYYYYY\BRRRRRRMessageReciever.csproj, C:\Build2017\1\s\AdaFrontend\AdaFrontend.csproj, C:\Build2017\1\s\XXXXYYYYY\BRRRRRRMessageReciever.csproj, C:\Build2017\1\s\XXXXYYYYY\BRRRRRRMessageReciever.csproj, C:\Build2017\1\s\RRRRTester\BRRRRRRMessageRecieverTester.csproj
2018-08-30T09:31:42.5840000Z WARNING: Duplicate ProjectGuid: "00000000-0000-0000-0000-000000000000". The project will not be analyzed by SonarQube. Project file: "C:\Build2017\1\s\XXXXYYYYY\BRRRRRRMessageReciever.csproj"
2018-08-30T09:31:42.5850000Z WARNING: Duplicate ProjectGuid: "00000000-0000-0000-0000-000000000000". The project will not be analyzed by SonarQube. Project file: "C:\Build2017\1\s\AdaFrontend\AdaFrontend.csproj"
2018-08-30T09:31:42.5860000Z WARNING: Duplicate ProjectGuid: "00000000-0000-0000-0000-000000000000". The project will not be analyzed by SonarQube. Project file: "C:\Build2017\1\s\RRRRTester\BRRRRRRMessageRecieverTester.csproj"
real_yggdrasil
  • 1,213
  • 4
  • 14
  • 27

1 Answers1

3

You should add one. The documentation is not very clear about this:

Single .NET Core project files (csproj or vbproj) will not be analyzed unless a unique guid element is added in the csproj or vbproj file. If the project is part of a solution, the element is not required.

But see the comments in this SO question that refers to the same error using SonarCloud (that product has the same code base as SonarQube). On this forum and this blog the same advice is given.

Jeroen Heier
  • 3,520
  • 15
  • 31
  • 32