C# 是否可以将Windows.Devices库添加到WinForm应用程序中?

C# 是否可以将Windows.Devices库添加到WinForm应用程序中?,c#,uwp,C#,Uwp,是否可以像下面的库那样将通用Windows库添加到c Winform项目中 using Windows.Devices 谢谢您也可以在非UWP项目中手动引用UWP库。这方面最新的指南是 简而言之,您需要从C:\Program Files x86\reference Assembly\Microsoft\Framework\.NETCore\v4.5和C:\Program Files x86\Windows Kits\10\中引用适当的winmd库 System.Runtime.WindowsR

是否可以像下面的库那样将通用Windows库添加到c Winform项目中

using Windows.Devices

谢谢

您也可以在非UWP项目中手动引用UWP库。这方面最新的指南是

简而言之,您需要从C:\Program Files x86\reference Assembly\Microsoft\Framework\.NETCore\v4.5和C:\Program Files x86\Windows Kits\10\中引用适当的winmd库

System.Runtime.WindowsRuntime-C:\Program Files x86\Reference Assembly\Microsoft\Framework.NETCore\v4.5 System.Runtime.WindowsRuntime.UI.Xaml-C:\Program Files x86\Reference Assembly\Microsoft\Framework.NETCore\v4.5 System.Runtime.InteropServices.WindowsRuntime-C:\Program Files x86\Reference Assembly\Microsoft\Framework.NETCore\v4.5 Windows.winmd-C:\Program Files x86\Windows Kits\10\UnionMetadata\Facade WINDOWS.UnvialSalpCopTrac.WINMD -C:\程序文件x86 \ Windows工具包\ 10个引用\WINDOWS .BuffelasPasePixRoupe WINDOWS.Basic合同。WINMCD-C:\程序文件x86\Windows工具包\ 10参考文献\WINDOWS.Basic。