Good morning everyone.
I've a very strange behavior looping through ListItemCollection items using CSOM (v 16) in a WPF application.
This happens only on one machine, while on others it works properly.
ListItemCollection items = prjList.GetItems(q);
context.Load(items);
context.ExecuteQuery();
List<XXXProject> res = new List<XXXProject>();
foreach (var p in items)
{The error is:
Unable to cast object of type 'System.Collections.Generic.Dictionary`2[System.String,System.Object]' to type 'Microsoft.SharePoint.Client.ListItem'
WPF Application is compiled with framework 4.0.
Using Fuslogvw.exe I've noticed that the SharePoint Client dlls loaded by the application are right.
Using the application with other client PC, all works fine.
Using the application with the same credentials on another PC, all works fine.
Any ideas?
Thanks,
Sergio
Regards,
Bubu
http://zsvipullo.blogspot.it
Please mark my answer if it helped you, I would greatly appreciate it.