以下项目没有有效的 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

查看:9
本文介绍了以下项目没有有效的 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> 标签指定在需要手动添加的默认模板.

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天全站免登陆