Trello.NET objects returning NULL

@dillenmeister I tried the Trello.NET wrapper, but it always returns NULL after successfully accepting AppKey and Token. I am sure that AppKey and Token are correct, because when I consciously entered the wrong AppKey / Token, I got an error.

Versions of packages that I installed:

Trello.NET 0.6.2 Json.NET 7.0.1 RestSharp 105.1.0

Follwing are class-level assembly references:

using System; using System.Collections.Generic; using System.Linq; using System.Web; using TrelloNet; using RestSharp; using Newtonsoft.Json.Serialization; public partial class TestTrello : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { ITrello trello = new Trello("[AppKey]"); trello.Authorize("[Token]"); // Get a board Board theTrelloDevBoard = trello.Boards.WithId("[boardId]"); string boardName = theTrelloDevBoard.Name; } } 

So what am I missing to make it work?

+4
source share
1 answer

It looks like a color enumeration in which multiple colors are missing . This throws an exception when you try to load board data. There, several transfer requests are open to fix the problem, but the creator has not yet combined it, perhaps because all PR calls cause the test suite to fail.

As a quick workaround, you can clone the repository:

 git clone https://github.com/dillenmeister/Trello.NET.git 

Refresh map \ Color.cs file

 public enum Color { Green, Yellow, Orange, Red, Purple, Blue, Turquoise, Lightgreen, Pink, Sky, Lime, Black } 

.. and then create a project in Visual Studio. Add the resulting TrelloNet.dll file as a link to your project, and you can get the board data.

Update

Via @ajwaka comment: Nuget has TrelloNet.Temp.Fork the same dev and seems to work.

+3
source

All Articles