From fa5a4435966c8899d20959df224cabdee8e6e178 Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Mon, 3 Aug 2020 15:08:04 -0500 Subject: [PATCH] Fix the trimming tests to link non-app assemblies correctly. (#40246) The PrepareForILLink target will pass any ManagedAssemblyToLink that isn't marked as IsTrimmable=true to a TrimmerRootAssembly. This will cause the assembly to be passed to the linker with `-a`, which means the asesmbly won't be fully trimmed. So any assembly outside of the runtimepack will be passed with -a (for example Microsoft.Extensions.*). Fix this by moving to BeforeTargets=PrepareForILLink and marking the single application assembly as a root. --- eng/testing/linker/SupportFiles/Directory.Build.targets | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eng/testing/linker/SupportFiles/Directory.Build.targets b/eng/testing/linker/SupportFiles/Directory.Build.targets index 49422a3..a9dfda8 100644 --- a/eng/testing/linker/SupportFiles/Directory.Build.targets +++ b/eng/testing/linker/SupportFiles/Directory.Build.targets @@ -20,11 +20,14 @@ + BeforeTargets="PrepareForILLink"> link + + + -- 2.7.4