Regarding my universal app project, I am getting compilation warning:
warning C4451: 'BackgroundServerTasks::ServerTask::Run::::deferral': Usage of ref class 'Windows::ApplicationModel::Background::BackgroundTaskDeferral' inside this context can lead to invalid marshaling of object across contexts
note: Consider using 'Platform::Agile' instead
in this file. How could I resolve this warning? Apparently, it is due to my using the BackgroundTaskDeferral
within a create_task
. I found no solution on Bing except for this post which dismisses the problem but I am not sure if it is applicable in this case.