Is the ManagementEventWatcher class no longer available in the System.Management namespace?

前端 未结 2 652
清酒与你
清酒与你 2021-01-13 11:46

I\'m getting the following error message:

The type or namespace name \'ManagementEventWatcher\' does not exist in the namespace \'System.Management\'

2条回答
  •  被撕碎了的回忆
    2021-01-13 12:17

    Check that you've selected the correct CLR version for the DLL that you are adding. I looked in my C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.1 folder and the System.Management.dll found in that folder still had the class. I added a reference and a using statement and I was able to construct it.

提交回复
热议问题