Skip to content

BinaryLog.ReadRecords reports Kind as EndOfFile for almost all records #877

@jjonescz

Description

@jjonescz

Steps to reproduce:

dotnet new console
dotnet build -bl # to create sample binlog
dotnet add package MSBuild.StructuredLogger --version 2.2.472

Replace Program.cs with:

using Microsoft.Build.Logging.StructuredLogger;

var records = BinaryLog.ReadRecords("msbuild.binlog").ToList();
Console.WriteLine($"Records: {records.Count}");
Console.WriteLine($"Kinds: {string.Join(", ", records.CountBy(r => r.Kind))}");
Console.WriteLine($"Example: {records.First(r => r.Args?.Message == "EvaluationStarted")}");
dotnet run

Observed output:

Records: 3893
Kinds: [EndOfFile, 3892], [ProjectImportArchive, 1]

Expected: some other kinds as well, for example BinaryLogRecordKind.ProjectEvaluationStarted for records.First(r => r.Args?.Message == "EvaluationStarted").Kind.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions