Skip to content

Commit b0507ca

Browse files
authored
Fix build to only enable ready-to-run for the Release configuration (#26290)
1 parent e5d40dc commit b0507ca

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

PowerShell.Common.props

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,20 @@
193193
<PropertyGroup Condition=" '$(AppDeployment)' == 'FxDependentDeployment' ">
194194
<!-- If we specify Environment too, it searches that first, no matter what order we specify-->
195195
<AppHostDotNetSearch>Global</AppHostDotNetSearch>
196+
</PropertyGroup>
197+
198+
<!-- Enable ready-to-run only for Release configuration -->
199+
<PropertyGroup Condition=" '$(AppDeployment)' == 'FxDependentDeployment' And '$(Configuration)' == 'Release' ">
196200
<PublishReadyToRun>true</PublishReadyToRun>
197201
<PublishReadyToRunEmitSymbols>true</PublishReadyToRunEmitSymbols>
198202
</PropertyGroup>
199203

200204
<PropertyGroup Condition=" '$(AppDeployment)' == 'SelfContained' ">
201205
<AppHostDotNetSearch>AppLocal</AppHostDotNetSearch>
206+
</PropertyGroup>
207+
208+
<!-- Enable ready-to-run only for Release configuration -->
209+
<PropertyGroup Condition=" '$(AppDeployment)' == 'SelfContained' And '$(Configuration)' == 'Release' ">
202210
<PublishReadyToRun>true</PublishReadyToRun>
203211
<PublishReadyToRunEmitSymbols>true</PublishReadyToRunEmitSymbols>
204212
</PropertyGroup>

0 commit comments

Comments
 (0)