Skip to content

BinLogToSln warning for projects using non-portable PDB format #256

@ericstj

Description

@ericstj

Summary

BinLogToSln emits a warning when processing projects that use Windows (full/non-portable) PDB format, because the tool attempts to read generated files from the PDB and that format doesn't support it.

Error

##[warning]Error processing generated files for '...\PresentationBuildTasks.csproj': System.InvalidOperationException: The compilation is not using a PDB format that can store generated files
   at Basic.CompilerLog.Util.RoslynUtil.ReadGeneratedFilesFromPdb(Boolean isCSharp, String diagnosticName, CommandLineArguments args) in /home/runner/work/complog/complog/src/Basic.CompilerLog.Util/RoslynUtil.cs:line 453
   at BinLogToSln.Program.<Main>g__getGeneratedFiles|3_9(<>c__DisplayClass3_1&, <>c__DisplayClass3_2&) in D:\a\_work\1\s\src\SourceBrowser\src\BinLogToSln\Program.cs:line 377

Context

This was observed when running BinLogToSln against binlogs from the dotnet/dotnet VMR build (dotnet/dotnet#6455). WPF projects like PresentationBuildTasks.csproj use Windows PDB format (/debug:full), which cannot store generated source files.

The source index data is still produced correctly for these projects — just without generated files. The warning is non-fatal but noisy.

Suggested Fix

BinLogToSln could catch this specific InvalidOperationException and either:

  • Silently skip generated file extraction for non-portable PDBs
  • Emit a single-line informational message instead of a full stack trace

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions