简体   繁体   English

如何找到记录的类的引用

[英]How to find the references of documented classes

I always struggle with finding references for documented classes. 我一直在努力寻找文档类的参考。 Take the HardwareIdentification class for example. 以HardwareIdentification类为例。 Ik can find the documentation just fine here . 我可以在这里找到文档。 In the documentation it says the class is in the System.Windows.Profile library. 在文档中说该类在System.Windows.Profile库中。 When however I open the 'Add reference' box this library is not found in either 'Assemblies.Framwork' or 'Assemblies.Extensions'. 但是,当我打开“添加引用”框时,在“ Assemblies.Framwork”或“ Assemblies.Extensions”中都找不到该库。 My search on Google results in find nothing. 我在Google上的搜索没有找到任何结果。 The NuGet package manager doesn't find this assembly either. NuGet程序包管理器也找不到此程序集。 So where is it? 那在哪呢 It's not in the GAC too. 它也不在GAC中。

The docs page mentions the Device Families and luckily provides the Windows SDK version that goes with that: docs页面提到了设备系列,并幸运地提供了与此配套的Windows SDK版本:

  • Windows Desktop Extension SDK (introduced v10.0.10240.0) Windows桌面扩展SDK(引入v10.0.10240.0)
  • Windows Mobile Extension SDK (introduced v10.0.10240.0) Windows Mobile Extension SDK(引入的v10.0.10240.0)
  • Windows 10 Anniversary Edition (introduced v10.0.14393.0) Windows 10周年纪念版(引入的v10.0.14393.0)

It also mentions that these Assemblies are for the WindowsRT / UWP development, it's likely these won't work elsewhere. 它还提到这些程序集是用于WindowsRT / UWP开发的,很可能这些程序无法在其他地方使用。

You can download the latest Windows SDK here: 您可以在此处下载最新的Windows SDK:

The default installation location is: 默认安装位置是:

  • C:\\Program Files (x86)\\Microsoft SDKs C:\\ Program Files(x86)\\ Microsoft SDK
  • C:\\Program Files\\Microsoft SDKs C:\\ Program Files \\ Microsoft SDK

If you're using Visual Studio 2017, you may need to enable the correct workloads for the SDK elements to be installed, my workload, for example, doesn't contain UWP. 如果您使用的是Visual Studio 2017,则可能需要为要安装的SDK元素启用正确的工作负载,例如,我的工作负载不包含UWP。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM