Reputation: 1867
As an early foray into IoT development I've written a simple "Hello World" console app in .Net Core 2.0 / C# and deployed it to a Raspberry Pi running Windows 10 IoT.
static void Main(string[] args)
{
Console.WriteLine("Hello World");
Console.ReadLine();
Console.WriteLine("Terminating");
}
Using this awesome article by Jeremy Lindsay I've published the EXE to my PI and then remotely executed it in a PowerShell window. The app runs fine, asides from one rather odd issue - rather than waiting for me to hit Enter after outputting "Hello World", it seems to skip the call to Console.ReadLine() and immediately displays the text "Terminating" before closing out cleanly.
I can find no reason for this odd behaviour - does anyone have an explanation and is there any way to get this to behave properly?
Upvotes: 5
Views: 253