如何在 VS2017 的桌面项目中访问 Windows.Management.Deployment 命名空间? [英] How to access Windows.Management.Deployment namespace in a Desktop project in VS2017?

查看:29
本文介绍了如何在 VS2017 的桌面项目中访问 Windows.Management.Deployment 命名空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:我们可以在 Windows 10 的何处找到 Windows.Management.Deployment.dll 或者我们如何安装它?

VS2017 - ver 15.9.6WinForm 项目中,我正在尝试遵循

Question: Where in Windows 10 we can find Windows.Management.Deployment.dll or how can we install it?

In a WinForm project in VS2017 - ver 15.9.6 I'm trying to follow C# example of PackageManager.FindUsers(String) method that uses classes from Windows.Management.Deployment namespace.

But can't seem to find the location of above dll that is needed to add a reference in VS2017 project. I installed UwpDestop NuGet package, also add a reference to windows.winmd file, but that did not help either. I'm using Windows 10 Pro- Update 1809.

解决方案

In your Winforms project you need to go to "Add Reference …" and hit the "Browse" button. Then navigate here and select the Windows.winmd file that corresponds to the Windows SDK you are targeting. Be sure to change the file extension filter to .

这篇关于如何在 VS2017 的桌面项目中访问 Windows.Management.Deployment 命名空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆