I have a Windows Store application that I am creating that has a Windows Runtime Component for a background task.
The solution builds with no problems in Visual Studio but when the background task is triggered, it always fails with the message "The program '[4204] backgroundTaskHost.exe' has exited with code 1 (0x1)."
The reference to the project containing the background task is in the main project and I am setting the entry point, so I don't know what the problem is. How do I get more information as to why the program is exiting?
I was calling an an asynchronous method that returned void. I changed that method to return a Task and used await when I called it. The task runs correctly now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With