使用SonarQube构建dotnet核心项目时,您可能会在日志中遇到错误:
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>
标记,因此需要手动添加。
因此,您需要像这样编辑.csproj文件:
<PropertyGroup>
<!-- other properties here -->
<!-- SonarQube needs this -->
<ProjectGuid>{E2CEBBAF-6DF7-41E9-815D-9AD4CF90C844}</ProjectGuid>
确保将自己的GUID放置在
<ProjectGuid>...</ProjectGuid>
标签内
关于sonarqube - 以下项目没有有效的ProjectGuid,并且未使用有效的解决方案(.sln)构建,因此将跳过分析,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50479716/