I am trying to configure an application for the Microsoft Store. I have the app uploaded to the store and have installed it from there onto my machine (as per MS instructions).
The app itself is .Net written in C# with a UWP wrapper that creates a MSIX package. The app package and everything that goes with it is working/uploaded etc.
From the app and following various instructions that all seem to follow the same theme, the following should work. Using the Windows.Services.Store and adding the interface due to needing the Desktop Bridge, the condensed lines of importance are...
[ComImport]
[Guid("x-y-z")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IInitializeWithWindow
{
void Initialize(IntPtr hwnd);
}
private static async Task<bool> InitializeLicense()
{
StoreContext Store = StoreContext.GetDefault();
StoreAppLicense License = await Store.GetAppLicenseAsync();
return true;
}
The bit..
await Store.GetAppLicenseAsync();
Shows error:
Error CS4036 'IAsyncOperation' does not contain a definition for 'GetAwaiter' and no extension method 'GetAwaiter' accepting a first argument of type 'IAsyncOperation' could be found (are you missing a using directive for 'System'?)
I am kind of stuck here. This seems to be what all the examples show, at least to this point. I figure I am missing something simple - any help appreciated.