参考:
在WinForm项目中使用Windows Runtime的方法

c# 使用运行时库配置

修改csproj配置文件
<TargetFramework>v4.5</TargetFramework>下面
添加
<targetPlatformVersion>10</targetPlatformVersion>
添加引用windows.winmd 添加引用中出现Universal Windows 添加引用Window.Foundation.dll 添加引用System.Runtime.WindowsRuntime
位于C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5