The following projects do not have a valid ProjectGuid and were not built using a valid solution (.sln) thus will be skipped from analysis

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

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

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

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

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


Here's a solution to adding the missing xml elements in powershell.

$paths = Get-ChildItem -include *.csproj -Recurse
foreach($pathobject in $paths) 
{
    $path = $pathobject.fullname
    $doc = New-Object System.Xml.XmlDocument
    $doc.Load($path)
    $child = $doc.CreateElement("ProjectGuid")
    $child.InnerText = "{"+[guid]::NewGuid().ToString().ToUpper()+"}"
    $node = $doc.SelectSingleNode("//Project/PropertyGroup")
    $node.AppendChild($child)
    $doc.Save($path)
}

The solution I came up with is to build the solution, not the project files. If using Azure DevOps, use **/*.sln instead of **/*.csproj in your DotNetCoreCLI build step.