Adding for search algorithm: Marshal.GetTypeLibGuidForAssembly
works for "new" SDK style csproj C# Projects where there is no ProjectGuid specified in a AssemblyInfo.cs file (they moved it to the solution .sln file only).
Using GetCustomAttributes(typeof(GuidAttribute), false)
was returning no results, even if <ProjectGuid>
was specified in the .csproj.
The posts https://stackoverflow.com/a/62988275/2299427 and https://github.com/dotnet/msbuild/issues/3923 brought me to understand the project GUID is no longer in use.