I had the same error but with xamarin debugging on an Android device. Would I recommend you check out your Nuget packages? I had different versions of Xamarin.Forms that were causing conflicts. Obviously, you need to make sure that they are all on equal versions of the forms.
Check and combine Xamarin Nuget packages with the latest stable version.
user8319817
source share