SonarCloud with VSTS has error Duplicate ProjectGuid: “00000000-0000-0000-0000-000000000000”

时间秒杀一切 提交于 2019-12-02 07:37:15

问题


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


回答1:


  <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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!