We added SonarCloud to the build pipeline of a large solution. Only one project in our solution is analyzed but we see this warning
WARNING: The following projects do not have a valid ProjectGuid and were not built using a valid solution (.sln) thus will be skipped from analysis...
D:\a\1\s\MyApp\MyApp.Entities\MyApp.Entities.csproj, D:\a\1\s\MyApp\MyApp.Core\MyApp.Core.csproj, D:\a\1\s\MyApp\MyApp.Mobile.Backend\MyApp.Mobile.Backend.csproj, D:\a\1\s\MyApp\MyApp.Entities\MyApp.Entities.csproj, D:\a\1\s\MyApp\MyApp.Core\MyApp.Core.csproj, D:\a\1\s\MyApp\MyApp.Web\MyApp.Web.csproj
WARNING: Duplicate ProjectGuid: "00000000-0000-0000-0000-000000000000". The project will not be analyzed by SonarQube. Project file: "D:\a\1\s\MyApp\MyApp.Entities\MyApp.Entities.csproj"
WARNING: Duplicate ProjectGuid: "00000000-0000-0000-0000-000000000000". The project will not be analyzed by SonarQube. Project file: "D:\a\1\s\MyApp\MyApp.Core\MyApp.Core.csproj"
WARNING: Duplicate ProjectGuid: "00000000-0000-0000-0000-000000000000". The project will not be analyzed by SonarQube. Project file: "D:\a\1\s\MyApp\MyApp.Mobile.Backend\MyApp.Mobile.Backend.csproj"
WARNING: Duplicate ProjectGuid: "00000000-0000-0000-0000-000000000000". The project will not be analyzed by SonarQube. Project file: "D:\a\1\s\MyApp\MyApp.Web\MyApp.Web.csproj"
The project structure is
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<ProjectGuid>{fc2f0da6-ddfe-67b2-8dae-eb292f55436f}</ProjectGuid>
</PropertyGroup>
You need to do the following: --> Add tag or label 'ProjectGuid ' to your files with .csproj extension with a different Guid for each file.
VIEW CODE (this code is not executable)
--> And for generate Guid, you can do it from https://www.guidgenerator.com/online-guid-generator.aspx
来源:https://stackoverflow.com/questions/50056816/sonarcloud-with-vsts-has-error-duplicate-projectguid-00000000-0000-0000-0000-0