Fix build to only enable ready-to-run for the Release configuration (#26290)

This commit is contained in:
Dongbo Wang
2025-10-23 11:21:01 -07:00
committed by GitHub
parent e5d40dc06d
commit b0507ca4cf
+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>