Skip to content
Prev Previous commit
Strip native symbols and exclude user assemblies in Debug
  • Loading branch information
kotlarmilos committed Dec 10, 2025
commit b3e5e42a2e153a2f1762586db67c4ba697a6e41f
8 changes: 6 additions & 2 deletions dotnet/targets/Xamarin.Shared.Sdk.props
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,14 @@
<PublishReadyToRun Condition="'$(PublishReadyToRun)' == ''">true</PublishReadyToRun>
<PublishReadyToRunComposite Condition="'$(PublishReadyToRun)' == 'true'">true</PublishReadyToRunComposite>
<PublishReadyToRunContainerFormat Condition="'$(PublishReadyToRun)' == 'true'">macho</PublishReadyToRunContainerFormat>
<!-- Strip native symbols from the R2R composite dylib in Release builds -->
<StripSymbols Condition="'$(PublishReadyToRun)' == 'true' And '$(Configuration)' == 'Release'">true</StripSymbols>
<StripSymbols Condition="'$(PublishReadyToRun)' == 'true'">true</StripSymbols>
</PropertyGroup>

<!-- Exclude user assemblies from R2R composite so they run interpreted for debugging -->
<ItemGroup Condition="'$(UseMonoRuntime)' == 'false' And '$(_PlatformName)' != 'macOS' And '$(PublishReadyToRun)' == 'true' And '$(Configuration)' != 'Release'">
<PublishReadyToRunExclude Include="$(TargetFileName)" />
</ItemGroup>

<ItemGroup Condition="'$(UseMonoRuntime)' == 'false' And '$(_PlatformName)' != 'macOS' And '$(PublishReadyToRun)' != 'true'">
<_BundlerEnvironmentVariables Include="DOTNET_ReadyToRun" Value="0" />
</ItemGroup>
Expand Down