I have developed, in Visual Studio 2015, a C# Console Application which uses the Discord.Net API. It works great running on my PC, which has Windows 10, however I am looking to run the program 24/7 on a Raspberry Pi.
The device I have is a Raspberry Pi 3 Model B+. It currently runs on the Raspberry Pi 3 B+ Technical Preview Build 17661 offered by Microsoft. I added all the files from my project's
\bin\Debug directory to my Pi's SD Card. I open the Windows Device Portal, and enter the command prompt to run the
.exe file from its path. However, doing so returns this error log:
Unhandled Exception: System.TypeLoadException: Could not load type 'System.Runtime.Serialization.SerializationBinder' from assembly 'mscorlib, Version=220.127.116.11, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. at Newtonsoft.Json.JsonSerializer..ctor() at Discord.API.DiscordRestApiClient..ctor(RestClientProvider restClientProvider, String userAgent, RetryMode defaultRetryMode, JsonSerializer serializer) at Discord.API.DiscordSocketApiClient..ctor(RestClientProvider restClientProvider, WebSocketProvider webSocketProvider, String userAgent, String url, RetryMode defaultRetryMode, JsonSerializer serializer) at Discord.WebSocket.DiscordSocketClient.CreateApiClient(DiscordSocketConfig config) at Discord.WebSocket.DiscordSocketClient..ctor() at TutorialBot.Program.<RunBotAsyc>d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at TutorialBot.Program.Main(String args)
I am not exactly sure how to handle, or fix, this issue. I have looked around for solutions, but I haven't gotten very far. Some other methods I have tried in order to run my program haven't been very successful so, if possible, I would really like to try to make this work on this OS.