From da7b0e3844340195a4fd6bb74764a45b008a6208 Mon Sep 17 00:00:00 2001 From: Jeremi Kurdek Date: Mon, 9 Sep 2024 12:02:46 +0200 Subject: [PATCH] Fix passing assemblies using relative path --- src/tasks/MonoTargetsTasks/ILStrip/ILStrip.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tasks/MonoTargetsTasks/ILStrip/ILStrip.cs b/src/tasks/MonoTargetsTasks/ILStrip/ILStrip.cs index 1814cba54eb18..34cc69f775283 100644 --- a/src/tasks/MonoTargetsTasks/ILStrip/ILStrip.cs +++ b/src/tasks/MonoTargetsTasks/ILStrip/ILStrip.cs @@ -127,13 +127,14 @@ private bool StripAssembly(ITaskItem assemblyItem) try { - if(!AssemblyStripper.AssemblyStripper.TryStripAssembly(assemblyFile, outputPath)) + if (!AssemblyStripper.AssemblyStripper.TryStripAssembly(assemblyFile, outputPath)) { Log.LogMessage(MessageImportance.Low, $"[ILStrip] Skipping {assemblyFile} because it is not a managed assembly."); } else { - _processedAssemblies.GetOrAdd(assemblyItem.ItemSpec, GetTrimmedAssemblyItem(assemblyItem, outputPath, assemblyFile)); + var fullPath = assemblyItem.GetMetadata("FullPath"); + _processedAssemblies.GetOrAdd(fullPath, GetTrimmedAssemblyItem(assemblyItem, outputPath, assemblyFile)); } } catch (Exception ex)