以下项目没有有效的ProjectGuid,并且未使用有效的解决方案(.sln)构建,因此将跳过分析 [英] The following projects do not have a valid ProjectGuid and were not built using a valid solution (.sln) thus will be skipped from analysis

查看:253
本文介绍了以下项目没有有效的ProjectGuid,并且未使用有效的解决方案(.sln)构建,因此将跳过分析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用SonarQube构建dotnet核心项目时,您可能会在日志中遇到错误:

When you are building a dotnet core project with SonarQube you may be facing the error in the log:


警告:以下项目没有有效的ProjectGuid且未使用有效的解决方案(.sln)构建,因此将被从分析中跳过...

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...

您应该怎么做?

推荐答案

由于dotnet核心项目(.csproj)将没有< ProjectGuid> ; ...< / ProjectGuid> 在默认模板中指定的标记,需要手动添加。

As dotnet core projects (.csproj) will not have <ProjectGuid>...</ProjectGuid> tag specified in the default template this needs to be manually added.

因此,您需要编辑.csproj文件,如下所示:

So you need to edit the .csproj file like this:

<PropertyGroup>
  <!-- other properties here -->

  <!-- SonarQube needs this -->
  <ProjectGuid>{E2CEBBAF-6DF7-41E9-815D-9AD4CF90C844}</ProjectGuid>

请确保将您自己的GUID放在< ProjectGuid>中。 。< / ProjectGuid> 标记

Make sure to place your own GUID inside the <ProjectGuid>...</ProjectGuid> Tag

这篇关于以下项目没有有效的ProjectGuid,并且未使用有效的解决方案(.sln)构建,因此将跳过分析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆