From f02da05ac9606bc9f3614d916776cf08d400199b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Tue, 13 Feb 2024 08:15:47 +0100 Subject: [PATCH] Avoid double writes to PDB in NAOT publish We currently let the publish logic do its things unaware of what PublishAot will do and then copy over native bits. In general, I wonder if we should switch to the same mechanism that R2R, ILLink, or Single file publishing use - have SDK [be aware of the magic target](https://github.com/dotnet/sdk/blob/95025c62f4e260540c1257627616641e9670501e/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets#L453-L460) and then modify ResolvedFileToPublish items as needed. --- .../BuildIntegration/Microsoft.NETCore.Native.Publish.targets | 1 + 1 file changed, 1 insertion(+) diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets index c407a8de6f16dd..e9a4424e819a23 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets @@ -24,6 +24,7 @@ <_ResolvedCopyLocalPublishAssets Remove="@(_AssembliesToSkipPublish)" /> <_ResolvedCopyLocalPublishAssets Include="@(_LinkedResolvedAssemblies)" /> + <_DebugSymbolsIntermediatePath Remove="@(_DebugSymbolsIntermediatePath)" />