参考:一、http://www.javashuo.com/article/p-urhkfiav-gd.htmlhtml
二、http://jennal.com/2016/04/28/using-windows-runtime-at-winform/web
三、https://software.intel.com/en-us/articles/using-winrt-apis-from-desktop-applicationswindows
大概总结下,主要就是先编辑项目文件,添加一条属性:app
<PropertyGroup> <TargetPlatformVersion>10.0</TargetPlatformVersion> </PropertyGroup>
加完这条属性后,就能够在引用中,勾选 Universal Windows 的组件了。异步
不过这样发布出来的程序,也就仅限于指定的 TargetPlatform 了。测试
关于 await 报错,根据参考连接文章指出,须要引用:spa
C:\Program Files (x86)\Windows Kits\10\UnionMetadata\widows.winmd3d
可是目前在 Windows 10 17763.379 中测试,引用会发生冲突,暂无解决方案,只能暂时不用 await 关键词来等待异步返回了。code