带有 VSTS 的 SonarCloud 有错误 Duplicate ProjectGuid: "00000000-0000-0000-0000-000000000000"

SonarCloud with VSTS has error Duplicate ProjectGuid: quot;00000000-0000-0000-0000-000000000000quot;(带有 VSTS 的 SonarCloud 有错误 Duplicate ProjectGuid: quot;00000000-0000-0000-0000-000000000000quot;)
本文介绍了带有 VSTS 的 SonarCloud 有错误 Duplicate ProjectGuid: "00000000-0000-0000-0000-000000000000"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们将 SonarCloud 添加到大型解决方案的构建管道中.我们的解决方案中只分析了一个项目,但我们看到了这个警告

We added SonarCloud to the build pipeline of a large solution. Only one project in our solution is analyzed but we see this warning

警告:以下项目没有有效的 ProjectGuid,并且不是使用有效的解决方案 (.sln) 构建的,因此将从分析中跳过...
D:a1sMyAppMyApp.EntitiesMyApp.Entities.csproj, D:a1sMyAppMyApp.CoreMyApp.Core.csproj, D:a1sMyAppMyApp.Mobile.BackendMyApp.Mobile.Backend.csproj, D:a1sMyAppMyApp.EntitiesMyApp.Entities.csproj, D:a1sMyAppMyApp.CoreMyApp.Core.csproj, D:a1sMyAppMyApp.WebMyApp.Web.csproj
警告:重复的 ProjectGuid:00000000-0000-0000-0000-000000000000".SonarQube 不会分析该项目.项目文件:D:a1sMyAppMyApp.EntitiesMyApp.Entities.csproj"
警告:重复的 ProjectGuid:00000000-0000-0000-0000-000000000000".SonarQube 不会分析该项目.项目文件:D:a1sMyAppMyApp.CoreMyApp.Core.csproj"
警告:重复的 ProjectGuid:00000000-0000-0000-0000-000000000000".SonarQube 不会分析该项目.项目文件:D:a1sMyAppMyApp.Mobile.BackendMyApp.Mobile.Backend.csproj"
警告:重复的 ProjectGuid:00000000-0000-0000-0000-000000000000".SonarQube 不会分析该项目.项目文件:D:a1sMyAppMyApp.WebMyApp.Web.csproj"

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:a1sMyAppMyApp.EntitiesMyApp.Entities.csproj, D:a1sMyAppMyApp.CoreMyApp.Core.csproj, D:a1sMyAppMyApp.Mobile.BackendMyApp.Mobile.Backend.csproj, D:a1sMyAppMyApp.EntitiesMyApp.Entities.csproj, D:a1sMyAppMyApp.CoreMyApp.Core.csproj, D:a1sMyAppMyApp.WebMyApp.Web.csproj
WARNING: Duplicate ProjectGuid: "00000000-0000-0000-0000-000000000000". The project will not be analyzed by SonarQube. Project file: "D:a1sMyAppMyApp.EntitiesMyApp.Entities.csproj"
WARNING: Duplicate ProjectGuid: "00000000-0000-0000-0000-000000000000". The project will not be analyzed by SonarQube. Project file: "D:a1sMyAppMyApp.CoreMyApp.Core.csproj"
WARNING: Duplicate ProjectGuid: "00000000-0000-0000-0000-000000000000". The project will not be analyzed by SonarQube. Project file: "D:a1sMyAppMyApp.Mobile.BackendMyApp.Mobile.Backend.csproj"
WARNING: Duplicate ProjectGuid: "00000000-0000-0000-0000-000000000000". The project will not be analyzed by SonarQube. Project file: "D:a1sMyAppMyApp.WebMyApp.Web.csproj"

项目结构是

推荐答案

  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
     <ProjectGuid>{fc2f0da6-ddfe-67b2-8dae-eb292f55436f}</ProjectGuid>
  </PropertyGroup>

您需要执行以下操作:-->为您的文件添加标签或标签ProjectGuid",扩展名为 .csproj,每个文件都有不同的 Guid.

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)

-->对于生成 Guid,您可以从https://www.guidgenerator.com/online-guid-generator.aspx

--> And for generate Guid, you can do it from https://www.guidgenerator.com/online-guid-generator.aspx

这篇关于带有 VSTS 的 SonarCloud 有错误 Duplicate ProjectGuid: &quot;00000000-0000-0000-0000-000000000000&quot;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

DispatcherQueue null when trying to update Ui property in ViewModel(尝试更新ViewModel中的Ui属性时DispatcherQueue为空)
Drawing over all windows on multiple monitors(在多个监视器上绘制所有窗口)
Programmatically show the desktop(以编程方式显示桌面)
c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
LINQ many-to-many relationship, how to write a correct WHERE clause?(LINQ多对多关系,如何写一个正确的WHERE子句?)