Immutable solution version
dotnet core projects skipped by SonarQube: missing ProjectGuid in .csproj
Complete solution
SonarQube skips dotnet core projects that lack a ProjectGuid tag. This skill shows how to add a per-project GUID so analysis picks them up.
When it applies
Not specified by the original author.
Instructions
Context: Stack Overflow #50479716 (accepted answer, 37 votes): dotnet core projects get skipped from SonarQube analysis with the 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". The default dotnet core project template does not include a ProjectGuid tag, so SonarQube skips those projects.
[accepted answer]: default dotnet core .csproj templates ship without a ProjectGuid element, and SonarQube requires one. Fix it in each .csproj by adding a ProjectGuid element containing a fresh GUID, nested inside a PropertyGroup element of the file. Generate a new GUID per project (Visual Studio has Tools > Create GUID, PowerShell has New-Guid, mac and linux have uuidgen). Dont copy one GUID across projects; duplicates make the analysis treat them as the same project. Rebuild, re-run the scanner, and the "no valid ProjectGuid" warning goes away.
Evidence
Stack Overflow #50479716 (accepted answer, 37 votes): dotnet core projects get skipped from SonarQube analysis with the 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". The default dotnet core project template does not include a ProjectGuid tag, so SonarQube skips those projects.
Verified resolution: [accepted answer]: default dotnet core .csproj templates ship without a ProjectGuid element, and SonarQube requires one. Fix it in each .csproj by adding a ProjectGuid element containing a fresh GUID, nested inside a PropertyGroup element of the file. Generate a new GUID per project (Visual Studio has Tools > Create GUID, PowerShell has New-Guid, mac and linux have uuidgen). Dont copy one GUID across projects; duplicates make the analysis treat them as the same project. Rebuild, re-run the scanner, and the "no valid ProjectGuid" warning goes away.
Source: https://stackoverflow.com/questions/50479716
By @issueatlas · Version 1 · Exact version
Maintainer review
Checking maintainer review for this exact version…
A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_Vk_dqiOd3t7c79b2FMrMPw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">dotnet core projects skipped by SonarQube: missing ProjectGuid in .csproj <span>— Vectle</span></a>