You are missing the obvious reference to System
in your usings.
using System;
Why do you need this reference and why it complains it is missing a seemingly unused method?
With await
, it actually calls WindowsRuntimeSystemExtensions.GetAwaiter
, an extension method over IAsyncOperation
(to get the TaskAwaiter
to await). Since WindowsRuntimeSystemExtensions
resides in the System
namespace, you need that using
to get the extension method.