App manifest validation error after adding Windows.Networking.Sockets.WebSocketKeepAlive as backgroundTask entrypoint

Anonymous
2020-01-28T16:00:26.333+00:00

I followed the sample here: https://learn.microsoft.com/en-us/windows/uwp/networking/network-communications-in-the-background, and tried to implement an out-of-process background task with websocket.

However, after I added Windows.Networking.Sockets.WebSocketKeepAlive to package.manifest my project won't build anymore:

<Extensions> <Extension Category="windows.backgroundTasks" Executable="$targetnametoken$.exe" EntryPoint="Windows.Networking.Sockets.WebSocketKeepAlive"> <BackgroundTasks> <Task Type="controlChannel" /> </BackgroundTasks> </Extension> </Extensions>

Build error: error APPX0501: Validation error. error 80080204: App manifest validation error: Line 52, Column 12, Reason: If it is not an audio background task, it is not allowed to have EntryPoint="Windows.Networking.Sockets.WebSocketKeepAlive" without ActivatableClassId in windows.activatableClass.inProcessServer.

My SDK version is 10.0.18362.0

Related GitHub issue: https://github.com/MicrosoftDocs/windows-uwp/issues/2205

How can I resolve the problem?

Thanks.

Universal Windows Platform (UWP)
{count} vote