Thanks Meppy for your answer
I tried with the original OutlookImporter class, but the same result occurs. I tried that just for fun
because I cannot use the code "as this" cause of the outlook security alert which is thrown each time the attendee or the decription property is read.
So I continued to use my custom code and I finally find why the dictionnary key exception is throw !
I will try to explain. Take the exemple of a daily appointment.
I want to display the calendar of a week.
Outlook will give me 7 appointments (one per day) and each of those have the same EntryID.
When importing, the planner.net wil get the first one, see that it's a recursive appointment and will create the 6 others for the displayed week. Next, the planner get the second appointment and attempt to create it but already exist and then throw the dictionnary key exception.
So I have founded a solution to avoid this exception. Maybe other people can be interested in.
So, I save every EntryID in an array and when I import the items, for each one I will check if the entryId is not already in my array.If not, I import the item without problem, else I simply ignore it.
Her is my code (in VB.Net) :
Dim arrID As New ArrayList(CInt(items.Count + 1))
For i As Int32 = 0 To items.Count - 1
Dim item As MindFusion.Scheduling.Item = ConvertFrom(items.Item(i))
If Not arrID.Contains(items.Item(i).EntryID) Then
_schedule.Items.Add(item)
arrID.Add(items.Item(i).EntryID)
End If
Next i
Greg.