我们将 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: "00000000-0000-0000-0000-000000000000"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!