From 0dc61be3968d8da07a38c3ca21a88a7dcfb44917 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Fri, 19 Dec 2025 15:31:53 -0800 Subject: [PATCH] Refactor input assemblies extraction directory structure Input assemblies are now extracted into a dedicated 'in' subdirectory within the temp folder, reducing clutter and making it easier to inspect the resulting .dll files. --- .../Generation/InteropGenerator.DebugRepro.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/WinRT.Interop.Generator/Generation/InteropGenerator.DebugRepro.cs b/src/WinRT.Interop.Generator/Generation/InteropGenerator.DebugRepro.cs index e2d5fea2f..367f650e2 100644 --- a/src/WinRT.Interop.Generator/Generation/InteropGenerator.DebugRepro.cs +++ b/src/WinRT.Interop.Generator/Generation/InteropGenerator.DebugRepro.cs @@ -68,10 +68,15 @@ private static string UnpackDebugRepro(string path, CancellationToken token) List referencePaths = []; string? outputAssemblyPath = null; + // Create another subdirectory for all the input assemblies. We don't put these in the top level + // temporary folder so that the number of files there remains very small. The reason is just to + // make inspecting the resulting .dll easier, without having to scroll past hundreds of folders. + string assembliesDirectory = Path.Combine(tempDirectory, "in"); + // Extract all .dll-s, one per directory, so we can ensure there's no name conflicts foreach ((int index, ZipArchiveEntry dllEntry) in dllEntries.Index()) { - string destinationFolder = Path.Combine(tempDirectory, index.ToString("000")); + string destinationFolder = Path.Combine(assembliesDirectory, index.ToString("000")); _ = Directory.CreateDirectory(destinationFolder);