From f58841afa55950af4a69c58a191e397e53b8c105 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sun, 19 Oct 2025 20:08:44 +0000
Subject: [PATCH 1/8] Add EventLogger for investigating graph build error
reporting
Co-authored-by: baronfel <573979+baronfel@users.noreply.github.com>
---
nuget.config.override | 6 +
src/Build/Logging/EventLogger.cs | 210 +++++++++++++++++++++++++++++++
src/Build/Microsoft.Build.csproj | 1 +
3 files changed, 217 insertions(+)
create mode 100644 nuget.config.override
create mode 100644 src/Build/Logging/EventLogger.cs
diff --git a/nuget.config.override b/nuget.config.override
new file mode 100644
index 00000000000..1043872131e
--- /dev/null
+++ b/nuget.config.override
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/src/Build/Logging/EventLogger.cs b/src/Build/Logging/EventLogger.cs
new file mode 100644
index 00000000000..d7eec0e8841
--- /dev/null
+++ b/src/Build/Logging/EventLogger.cs
@@ -0,0 +1,210 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text.Json;
+using Microsoft.Build.Framework;
+
+namespace Microsoft.Build.Logging
+{
+ ///
+ /// A logger that captures all events to a JSON file for analysis.
+ /// This logger listens to the same events as TerminalLogger.
+ ///
+ public class EventLogger : ILogger
+ {
+ private string? _outputFile;
+ private StreamWriter? _writer;
+ private readonly List