我在尝试使用 Manatee.Trello 时遇到了一个异常。我试图创建一个这样的 Func:
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;
});
但是上面标记的行抛出了这个异常:
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"}
我不确定这是我的代码做错了什么,还是我在使用 Manatee.Trello 设置项目时犯了某种设置错误,也许 NuGet 包被抬高了......
任何关于从哪里开始寻找的提示将不胜感激。