I met an UWP issue, and asked question as below post: How to detect user idle in UWP?
Thanks for Nico to answer my question! And he provided an example code here: https://stefanwick.com/2018/05/15/global-hotkey-registration-in-uwp/ https://github.com/StefanWickDev/ExtensionGallery/tree/master/GlobalHotkey
Some of the codes which report compile errors are:
using Windows.ApplicationModel;
using Windows.ApplicationModel.AppService;
using Windows.ApplicationModel.Core;
using Windows.Foundation.Collections;
using Windows.Storage;
But I cannot run the above code, I mean the GlobalHotkey project. I got 18 compile errors as below picture shown.
The first error is:
The type or namespace name 'ApplicationModel' does not exist in the namespace 'Windows'
I cannot find Windows.ApplicationModel by this way:
Project -> Right Click -> Add -> Reference -> Assemblies -> Search "System.Drawing"
And I did not change the code at all. I also install the SDK Build 17134, which is required by the original code. Why?
More:
To answer Pavel Anikhouski's question, please check below picture. I have the two files, and no items under Universal Windows subtree.