I also had this error. In my case, this turned out to be a xaml problem. I have not made any changes to any DLL files or links. I just made some recent haml changes and I suddenly started getting this error. This haml that I wrote caused the problem:
<StackLayout Grid.Row="4" Orientation="Horizontal" HorizontalOptions="Center" > <StackLayout.Children> <Label Text="Holes" BackgroundColor="White" VerticalOptions="Center"/> <Entry x:Name="entryHoles" BackgroundColor="White" WidthRequest="100"/> </StackLayout.Children> <StackLayout.Children> <Label Text="Par" BackgroundColor="White" VerticalOptions="Center"/> <Entry x:Name="entryPar" BackgroundColor="White" WidthRequest="100"/> </StackLayout.Children> </StackLayout>
There should be only one StackLayout.Children tag. This is what I switched to in order to clear this error:
<StackLayout Grid.Row="4" Orientation="Horizontal" HorizontalOptions="Center" > <StackLayout.Children> <Label Text="Holes" BackgroundColor="White" VerticalOptions="Center"/> <Entry x:Name="entryHoles" BackgroundColor="White" WidthRequest="100"/> <Label Text="Par" BackgroundColor="White" VerticalOptions="Center"/> <Entry x:Name="entryPar" BackgroundColor="White" WidthRequest="100"/> </StackLayout.Children> </StackLayout>
I bet that the optional StackLayout.Children tag triggered this message: "An item with the same key has already been added." If so, it would be great if Microsoft told us what a duplicate element is. I spent a lot of time updating NuGet packages.
dev1998
source share