[release/7.0.1xx-xcode14.2] [win] Add Hot Restart define constant in a target instead of an evaluation property. (#17471)
This is needed in order to read the correct value of the "IsHotRestartBuild" property set by the VS extension. Doing it in a PropertyGroup at evaluation was not getting the correct value since it was not being set as an MSBuild global property This PR is related to this other one in the XVS extension: https://github.com/xamarin/XamarinVS/pull/13612 Backport of #17470 Co-authored-by: Mauro Agnoletti <mauro.agnoletti@gmail.com>
This commit is contained in:
Родитель
c18ed0c38b
Коммит
9ffa71bdb3
|
@ -13,8 +13,5 @@
|
|||
<HotRestartIPAPath>$(HotRestartSignedAppOutputDir)$(_AppBundleName).ipa</HotRestartIPAPath>
|
||||
|
||||
<UnpackHotRestartFrameworks Condition="'$(UnpackHotRestartFrameworks)' == ''">true</UnpackHotRestartFrameworks>
|
||||
|
||||
<_IsHotRestartDefined>$([System.Text.RegularExpressions.Regex]::IsMatch('$(DefineConstants.Trim())', '(^|;)HOTRESTART($|;)'))</_IsHotRestartDefined>
|
||||
<DefineConstants Condition="!$(_IsHotRestartDefined) And '$(IsHotRestartBuild)' == 'true'">HOTRESTART;$(DefineConstants)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
@ -14,6 +14,13 @@
|
|||
<Import Project="$(MSBuildThisFileDirectory)Xamarin.Messaging.Build.targets" Condition="Exists('$(MSBuildThisFileDirectory)Xamarin.Messaging.Build.targets') And '$(MessagingBuildTargetsImported)' != 'true'" />
|
||||
<Import Project="$(MSBuildThisFileDirectory)Xamarin.Messaging.Apple.targets" Condition="Exists('$(MSBuildThisFileDirectory)Xamarin.Messaging.Apple.targets') And '$(MessagingAppleTargetsImported)' != 'true'" />
|
||||
|
||||
<Target Name="AddHotRestartDefineConstants" BeforeTargets="AddImplicitDefineConstants">
|
||||
<PropertyGroup>
|
||||
<_IsHotRestartDefined>$([System.Text.RegularExpressions.Regex]::IsMatch('$(DefineConstants.Trim())', '(^|;)HOTRESTART($|;)'))</_IsHotRestartDefined>
|
||||
<DefineConstants Condition="!$(_IsHotRestartDefined) And '$(IsHotRestartBuild)' == 'true'">HOTRESTART;$(DefineConstants)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="_DetectHotRestartSigningIdentity" AfterTargets="_DetectAppManifest"
|
||||
Condition="'$(_CanOutputAppBundle)' == 'true' And '$(IsHotRestartBuild)' == 'true' And '$(IsHotRestartEnvironmentReady)' == 'true'" >
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче