Reputation: 3611
I just came across an exception while trying something with Manatee.Trello. I was trying to create a Func like this:
var criteria = new List<string>
{
"(put a board ID here)"
};
var query = new Func<IEnumerable<Manatee.Trello.Member>, IEnumerable<Manatee.Trello.Board>>(
members =>
{
foreach (var member in members)
{
var selectedBoards = member.Boards.Where(b => criteria.Contains(b.Id, StringComparer.Ordinal));
boards.AddRange(selectedBoards); // Exception thrown here
}
return boards;
});
But the line marked above throws this exception:
System.TypeLoadException
{"Method 'get_StatusCode' in type 'Manatee.Trello.RestSharp.RestSharpResponse' from assembly 'Manatee.Trello.RestSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=783b036be1eaf5a7' does not have an implementation.":"Manatee.Trello.RestSharp.RestSharpResponse"}
I'm not sure if this is something I'm doing wrong with my code, or some kind of setup error I made in setting up my project with Manatee.Trello, perhaps the NuGet packages are jacked up...
Any tips on where to start looking would be much appreciated.
Upvotes: 0
Views: 79
Reputation: 3611
This situation was remedied by changing from the RestSharp provider included in Manatee.Trello
to the provider in Manatee.Trello.WebApi
. As I discovered in the library's documentation:
Manatee.Trello.RestSharp is backed by (you guessed it) RestSharp. There have been some issues with the .Net 4.5+ versions, so it's suggested you don't use this one unless you are using .Net 4.0 or earlier.
Indeed, I am using .Net 4.5.2.
Upvotes: 0