[release/v7.6] Fix build to only enable ready-to-run for the Release configuration (#26481)

Co-authored-by: Dongbo Wang <dongbow@microsoft.com>
This commit is contained in:
Travis Plunk
2025-11-19 14:55:15 -08:00
committed by GitHub
co-authored by Dongbo Wang
parent 22636e047f
commit 46f219cbd0
+8
View File
@@ -193,12 +193,20 @@
<PropertyGroup Condition=" '$(AppDeployment)' == 'FxDependentDeployment' ">
<!-- If we specify Environment too, it searches that first, no matter what order we specify-->
<AppHostDotNetSearch>Global</AppHostDotNetSearch>
</PropertyGroup>
<!-- Enable ready-to-run only for Release configuration -->
<PropertyGroup Condition=" '$(AppDeployment)' == 'FxDependentDeployment' And '$(Configuration)' == 'Release' ">
<PublishReadyToRun>true</PublishReadyToRun>
<PublishReadyToRunEmitSymbols>true</PublishReadyToRunEmitSymbols>
</PropertyGroup>
<PropertyGroup Condition=" '$(AppDeployment)' == 'SelfContained' ">
<AppHostDotNetSearch>AppLocal</AppHostDotNetSearch>
</PropertyGroup>
<!-- Enable ready-to-run only for Release configuration -->
<PropertyGroup Condition=" '$(AppDeployment)' == 'SelfContained' And '$(Configuration)' == 'Release' ">
<PublishReadyToRun>true</PublishReadyToRun>
<PublishReadyToRunEmitSymbols>true</PublishReadyToRunEmitSymbols>
</PropertyGroup>