Open tohoff82 opened 4 years ago
My fix was extracting it and putting a try catch around the dictionary.Add(key, value) in the method VCardUtil.GetAdditionalKeyMembers Its everything else but beautiful but it makes it work
I use Nuget, and I get: System.ArgumentException: An item with the same key has already been added.
Which is the key ?
IEnumerable
string contents = File.ReadAllText(vcfMovil, Encoding.UTF8);
IEnumerable<VCard> vcards2 = MixERP.Net.VCards.Deserializer.GetVCards(contents);
foreach (var vcard in vcards2)
{
Console.WriteLine(vcard.FirstName + " \t " + vcard.MiddleName + " " + vcard.LastName);
Console.WriteLine(vcard.FormattedName);
}
System.ArgumentException: An item with the same key has already been added. Key: TYPE at System.Collections.Generic.Dictionary
2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at MixERP.Net.VCards.Parser.TokenParser.GetAdditionalKeyMembers(String data) at MixERP.Net.VCards.Parser.TokenParser.GetToken(String line) at MixERP.Net.VCards.Parser.TokenParser.Parse(String contents) at MixERP.Net.VCards.Deserializer.GetVCard(String contents) at System.Linq.Enumerable.SelectArrayIterator
2.ToList() at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at MixERP.Net.VCards.Deserializer.GetVCards(String contents)