From e644cf56fbd0245c58e0744d97f679c8ffa4bed0 Mon Sep 17 00:00:00 2001 From: Mike Mostachetti Date: Thu, 13 Aug 2020 16:12:43 -0700 Subject: [PATCH] Fix Latest Xamarin Forms UWP Crash --- SlideOverKit.Droid/SlideOverKit.Droid.csproj | 42 ++++++++-------- SlideOverKit.Droid/packages.config | 2 +- SlideOverKit.UWP/SlideOverKitUWPHandler.cs | 9 +++- SlideOverKit.UWP/project.json | 3 +- SlideOverKit.iOS/SlideOverKit.iOS.csproj | 32 ++++++++----- SlideOverKit.iOS/packages.config | 2 +- SlideOverKit/SlideOverKit.csproj | 2 +- .../Droid/Properties/AndroidManifest.xml | 2 +- .../SlideOverKit.MoreSample.Droid.csproj | 48 +++++++++---------- SlideOverKitMoreSamples/Droid/packages.config | 2 +- .../SlideOverKit.MoreSample.UWP.csproj | 2 +- .../SlideOverKit.MoreSample.csproj | 2 +- .../iOS/SlideOverKit.MoreSample.iOS.csproj | 42 ++++++++-------- SlideOverKitMoreSamples/iOS/packages.config | 2 +- 14 files changed, 102 insertions(+), 90 deletions(-) diff --git a/SlideOverKit.Droid/SlideOverKit.Droid.csproj b/SlideOverKit.Droid/SlideOverKit.Droid.csproj index 52a3633..44aa884 100644 --- a/SlideOverKit.Droid/SlideOverKit.Droid.csproj +++ b/SlideOverKit.Droid/SlideOverKit.Droid.csproj @@ -1,6 +1,6 @@ - + - + Debug AnyCPU @@ -12,10 +12,11 @@ Resources Resource Resources\Resource.designer.cs - True SlideOverKit.Droid - v8.1 + v9.0 1.1.0 + + true @@ -42,21 +43,6 @@ - - ..\packages\Xamarin.Forms.2.5.0.280555\lib\MonoAndroid10\FormsViewGroup.dll - - - ..\packages\Xamarin.Forms.2.5.0.280555\lib\MonoAndroid10\Xamarin.Forms.Core.dll - - - ..\packages\Xamarin.Forms.2.5.0.280555\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll - - - ..\packages\Xamarin.Forms.2.5.0.280555\lib\MonoAndroid10\Xamarin.Forms.Platform.dll - - - ..\packages\Xamarin.Forms.2.5.0.280555\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll - ..\packages\Xamarin.Android.Support.Annotations.26.1.0.1\lib\MonoAndroid80\Xamarin.Android.Support.Annotations.dll @@ -114,6 +100,15 @@ ..\packages\Xamarin.Android.Support.v7.MediaRouter.26.1.0.1\lib\MonoAndroid80\Xamarin.Android.Support.v7.MediaRouter.dll + + ..\packages\Xamarin.Forms.4.8.0.1269\lib\netstandard2.0\Xamarin.Forms.Core.dll + + + ..\packages\Xamarin.Forms.4.8.0.1269\lib\netstandard2.0\Xamarin.Forms.Platform.dll + + + ..\packages\Xamarin.Forms.4.8.0.1269\lib\netstandard2.0\Xamarin.Forms.Xaml.dll + @@ -132,7 +127,6 @@ - @@ -152,4 +146,12 @@ + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + \ No newline at end of file diff --git a/SlideOverKit.Droid/packages.config b/SlideOverKit.Droid/packages.config index 988d193..659066f 100644 --- a/SlideOverKit.Droid/packages.config +++ b/SlideOverKit.Droid/packages.config @@ -19,5 +19,5 @@ - + \ No newline at end of file diff --git a/SlideOverKit.UWP/SlideOverKitUWPHandler.cs b/SlideOverKit.UWP/SlideOverKitUWPHandler.cs index bc02ccf..3e8da2a 100644 --- a/SlideOverKit.UWP/SlideOverKitUWPHandler.cs +++ b/SlideOverKit.UWP/SlideOverKitUWPHandler.cs @@ -10,6 +10,7 @@ using Windows.UI.Xaml.Media.Animation; using Xamarin.Forms; using Xamarin.Forms.Platform.UWP; +using SolidColorBrush = Windows.UI.Xaml.Media.SolidColorBrush; namespace SlideOverKit.UWP { @@ -42,8 +43,12 @@ public void Init(ISlideOverKitPageRendererUWP menuKit) void OnElementChanged(ElementChangedEventArgs e) { _basePage = e.NewElement as IMenuContainerPage; - e.NewElement.Disappearing += NewElement_Disappearing; - e.NewElement.Appearing += NewElement_Appearing; + if (e.NewElement != null) + { + e.NewElement.Disappearing += NewElement_Disappearing; + e.NewElement.Appearing += NewElement_Appearing; + } + _popupBasePage = e.NewElement as IPopupContainerPage; FindRootCanvas(Windows.UI.Xaml.Window.Current.Content); diff --git a/SlideOverKit.UWP/project.json b/SlideOverKit.UWP/project.json index cc82fb2..58f52e3 100644 --- a/SlideOverKit.UWP/project.json +++ b/SlideOverKit.UWP/project.json @@ -1,7 +1,8 @@ { "dependencies": { "Microsoft.NETCore.UniversalWindowsPlatform": "6.0.7", - "Xamarin.Forms": "2.5.0.280555" + "Microsoft.UI.Xaml": "2.4.3", + "Xamarin.Forms": "4.8.0.1269" }, "frameworks": { "uap10.0.16299": {} diff --git a/SlideOverKit.iOS/SlideOverKit.iOS.csproj b/SlideOverKit.iOS/SlideOverKit.iOS.csproj index bedcb00..33259d1 100644 --- a/SlideOverKit.iOS/SlideOverKit.iOS.csproj +++ b/SlideOverKit.iOS/SlideOverKit.iOS.csproj @@ -1,6 +1,6 @@ - + - + Debug AnyCPU @@ -11,6 +11,8 @@ Resources SlideOverKit.iOS 1.1.0 + + true @@ -34,19 +36,16 @@ - - - ..\packages\Xamarin.Forms.2.5.0.280555\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll - - - ..\packages\Xamarin.Forms.2.5.0.280555\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll + + ..\packages\Xamarin.Forms.4.8.0.1269\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll - - ..\packages\Xamarin.Forms.2.5.0.280555\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll + + ..\packages\Xamarin.Forms.4.8.0.1269\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll - - ..\packages\Xamarin.Forms.2.5.0.280555\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll + + ..\packages\Xamarin.Forms.4.8.0.1269\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll + @@ -66,5 +65,12 @@ - + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + \ No newline at end of file diff --git a/SlideOverKit.iOS/packages.config b/SlideOverKit.iOS/packages.config index bcd1520..708b7fd 100644 --- a/SlideOverKit.iOS/packages.config +++ b/SlideOverKit.iOS/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/SlideOverKit/SlideOverKit.csproj b/SlideOverKit/SlideOverKit.csproj index 6c40409..5cc8ee6 100644 --- a/SlideOverKit/SlideOverKit.csproj +++ b/SlideOverKit/SlideOverKit.csproj @@ -4,7 +4,7 @@ - + diff --git a/SlideOverKitMoreSamples/Droid/Properties/AndroidManifest.xml b/SlideOverKitMoreSamples/Droid/Properties/AndroidManifest.xml index 4061ab5..8ff732d 100755 --- a/SlideOverKitMoreSamples/Droid/Properties/AndroidManifest.xml +++ b/SlideOverKitMoreSamples/Droid/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/SlideOverKitMoreSamples/Droid/SlideOverKit.MoreSample.Droid.csproj b/SlideOverKitMoreSamples/Droid/SlideOverKit.MoreSample.Droid.csproj index 30e96a4..b74e832 100644 --- a/SlideOverKitMoreSamples/Droid/SlideOverKit.MoreSample.Droid.csproj +++ b/SlideOverKitMoreSamples/Droid/SlideOverKit.MoreSample.Droid.csproj @@ -1,6 +1,6 @@ - + - + Debug AnyCPU @@ -14,10 +14,11 @@ Resource Resources\Resource.designer.cs True - True SlideOverKit.Sample.Droid - v8.1 + v9.0 1.1.0 + + true @@ -44,26 +45,6 @@ - - ..\..\packages\Xamarin.Forms.2.5.0.280555\lib\MonoAndroid10\FormsViewGroup.dll - False - - - ..\..\packages\Xamarin.Forms.2.5.0.280555\lib\MonoAndroid10\Xamarin.Forms.Core.dll - False - - - ..\..\packages\Xamarin.Forms.2.5.0.280555\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll - False - - - ..\..\packages\Xamarin.Forms.2.5.0.280555\lib\MonoAndroid10\Xamarin.Forms.Platform.dll - False - - - ..\..\packages\Xamarin.Forms.2.5.0.280555\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll - False - ..\..\packages\Xamarin.Android.Support.Annotations.26.1.0.1\lib\MonoAndroid80\Xamarin.Android.Support.Annotations.dll @@ -126,6 +107,15 @@ ..\..\packages\Xamarin.Android.Support.v7.MediaRouter.26.1.0.1\lib\MonoAndroid80\Xamarin.Android.Support.v7.MediaRouter.dll False + + ..\..\packages\Xamarin.Forms.4.8.0.1269\lib\netstandard2.0\Xamarin.Forms.Core.dll + + + ..\..\packages\Xamarin.Forms.4.8.0.1269\lib\netstandard2.0\Xamarin.Forms.Platform.dll + + + ..\..\packages\Xamarin.Forms.4.8.0.1269\lib\netstandard2.0\Xamarin.Forms.Xaml.dll + @@ -142,7 +132,6 @@ - @@ -193,7 +182,6 @@ - @@ -213,4 +201,12 @@ + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + \ No newline at end of file diff --git a/SlideOverKitMoreSamples/Droid/packages.config b/SlideOverKitMoreSamples/Droid/packages.config index 988d193..659066f 100644 --- a/SlideOverKitMoreSamples/Droid/packages.config +++ b/SlideOverKitMoreSamples/Droid/packages.config @@ -19,5 +19,5 @@ - + \ No newline at end of file diff --git a/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/SlideOverKit.MoreSample.UWP.csproj b/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/SlideOverKit.MoreSample.UWP.csproj index 7db397e..fc28541 100644 --- a/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/SlideOverKit.MoreSample.UWP.csproj +++ b/SlideOverKitMoreSamples/SlideOverKit.MoreSample.UWP/SlideOverKit.MoreSample.UWP.csproj @@ -181,7 +181,7 @@ 6.0.7 - 2.5.0.280555 + 4.8.0.1269 diff --git a/SlideOverKitMoreSamples/SlideOverKit.Sample/SlideOverKit.MoreSample.csproj b/SlideOverKitMoreSamples/SlideOverKit.Sample/SlideOverKit.MoreSample.csproj index f2d724e..629cad6 100644 --- a/SlideOverKitMoreSamples/SlideOverKit.Sample/SlideOverKit.MoreSample.csproj +++ b/SlideOverKitMoreSamples/SlideOverKit.Sample/SlideOverKit.MoreSample.csproj @@ -4,7 +4,7 @@ - + diff --git a/SlideOverKitMoreSamples/iOS/SlideOverKit.MoreSample.iOS.csproj b/SlideOverKitMoreSamples/iOS/SlideOverKit.MoreSample.iOS.csproj index eca73cd..73df594 100644 --- a/SlideOverKitMoreSamples/iOS/SlideOverKit.MoreSample.iOS.csproj +++ b/SlideOverKitMoreSamples/iOS/SlideOverKit.MoreSample.iOS.csproj @@ -1,6 +1,6 @@ - + - + Debug iPhoneSimulator @@ -11,6 +11,8 @@ Resources SlideOverKit.Sample.iOS 1.1.0 + + true @@ -69,23 +71,16 @@ - - - ..\..\packages\Xamarin.Forms.2.5.0.280555\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll - False + + ..\..\packages\Xamarin.Forms.4.8.0.1269\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll - - ..\..\packages\Xamarin.Forms.2.5.0.280555\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll - False + + ..\..\packages\Xamarin.Forms.4.8.0.1269\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll - - ..\..\packages\Xamarin.Forms.2.5.0.280555\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll - False - - - ..\..\packages\Xamarin.Forms.2.5.0.280555\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll - False + + ..\..\packages\Xamarin.Forms.4.8.0.1269\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll + ..\..\packages\Xamarin.TestCloud.Agent.0.21.4\lib\Xamarin.iOS\Calabash.dll False @@ -161,15 +156,22 @@ {172A0370-0293-4003-AD03-57419DDDC6BD} SlideOverKit.iOS + false + false {EF099C9A-2BB4-468D-8352-867896E7B275} SlideOverKit - - - + - + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + \ No newline at end of file diff --git a/SlideOverKitMoreSamples/iOS/packages.config b/SlideOverKitMoreSamples/iOS/packages.config index f073e93..be86e1f 100644 --- a/SlideOverKitMoreSamples/iOS/packages.config +++ b/SlideOverKitMoreSamples/iOS/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file