From: Eric Erhardt Date: Mon, 3 Aug 2020 20:08:04 +0000 (-0500) Subject: Fix the trimming tests to link non-app assemblies correctly. (#40246) X-Git-Tag: submit/tizen/20210909.063632~6259 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fa5a4435966c8899d20959df224cabdee8e6e178;p=platform%2Fupstream%2Fdotnet%2Fruntime.git 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. --- 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 + + +