From 5f4400d9af914d95d0357dd0e2409aed7e3975ac Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Wed, 6 May 2026 17:04:38 -0300 Subject: [PATCH] Deduplicate Compile items in startup pipeline Normalize Compile items with MSBuild Distinct() after selecting the active top-level startup file so duplicate Compile entries are removed before downstream targets run. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/SmallSharp/SmallSharp.targets | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/SmallSharp/SmallSharp.targets b/src/SmallSharp/SmallSharp.targets index dc3f12a..db29960 100644 --- a/src/SmallSharp/SmallSharp.targets +++ b/src/SmallSharp/SmallSharp.targets @@ -14,7 +14,7 @@ $(S) $(ActiveDebugProfile) true - EnsureProperties;CollectStartupFile;ResolveStartupFile;SelectStartupFile;SelectTopLevelCompile;UpdateLaunchSettings;EmitTargets + EnsureProperties;CollectStartupFile;ResolveStartupFile;SelectStartupFile;SelectTopLevelCompile;DeduplicateCompile;UpdateLaunchSettings;EmitTargets $(MSBuildProjectExtensionsPath)$(MSBuildProjectFile).smallsharp.props @@ -172,6 +172,16 @@ + + + <_DistinctCompile Remove="@(_DistinctCompile)" /> + <_DistinctCompile Include="@(Compile -> Distinct())" /> + + + <_DistinctCompile Remove="@(_DistinctCompile)" /> + + +