Respect CopyOutputSymbolsToPublishDirectory in PublishAot (#88815)
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>
Thu, 13 Jul 2023 23:58:28 +0000 (08:58 +0900)
committerGitHub <noreply@github.com>
Thu, 13 Jul 2023 23:58:28 +0000 (08:58 +0900)
Fixes dotnet/sdk#33476.

src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Publish.targets

index 8b18460..e6805c2 100644 (file)
     <!-- replace native symbol file if it exists -->
     <Delete Files="$(PublishDir)\$(TargetName)$(_symbolExt)" />
     <Copy SourceFiles="$(NativeOutputPath)$(TargetName)$(_symbolExt)" DestinationFolder="$(PublishDir)"
-      Condition="Exists('$(NativeOutputPath)$(TargetName)$(_symbolExt)')" />
+      Condition="Exists('$(NativeOutputPath)$(TargetName)$(_symbolExt)') and '$(CopyOutputSymbolsToPublishDirectory)' == 'true'" />
   </Target>
 
 </Project>