我剛剛遇到一個異常,同時嘗試使用Manatee.Trello。我試圖創建一個函數功能是這樣的:異常拋出Manatee.Trello.RestSharp.RestSharpResponse
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包被擡高了...
任何有關從哪裏開始尋找的提示都將不勝感激。
這可能是一個RestSharp提供程序問題。切換到WebApi,看看是否修復它... – bubbleking
@bubbleking - 它確實。 – bubbleking
你剛剛在自己的評論回覆中標記自己? – gregsdennis