diff --git a/.paket/Paket.Restore.targets b/.paket/Paket.Restore.targets index 017f39497..c9506cc71 100644 --- a/.paket/Paket.Restore.targets +++ b/.paket/Paket.Restore.targets @@ -105,8 +105,8 @@ true - @@ -228,7 +228,6 @@ - <_NuspecFilesNewLocation Include="$(BaseIntermediateOutputPath)$(Configuration)\*.nuspec"/> @@ -238,12 +237,10 @@ $(MSBuildProjectDirectory)/$(MSBuildProjectFile) true - false - true false - true + true false - true + true false true $(BaseIntermediateOutputPath)$(Configuration) @@ -261,53 +258,6 @@ - - ) then canReuseNavigationPage prevChild newChild else @@ -239,6 +239,16 @@ module Converters = | ValueSome prevPages, ValueSome newPages -> (prevPages, newPages) ||> Seq.forall2 canReuseChild | _, _ -> true + /// Checks whether the control can be reused given the previous and the new AutomationId. + /// Xamarin.Forms can't change an already setted AutomationId + and internal canReuseAutomationId (prevChild: ViewElement) (newChild: ViewElement) = + let prevAutomationId = prevChild.TryGetAttribute("AutomationId") + let newAutomationId = newChild.TryGetAttribute("AutomationId") + + match prevAutomationId with + | ValueSome _ when prevAutomationId <> newAutomationId -> false + | _ -> true + /// Update a control given the previous and new view elements let inline updateChild (prevChild:ViewElement) (newChild:ViewElement) targetChild = newChild.UpdateIncremental(prevChild, targetChild)