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


i'm getting following error message:

the type or namespace name 'managementeventwatcher' not exist in namespace 'system.management' (are missing assembly reference?)

i have included system.management in project references, yet type cannot found.

i have run visual studio administrator , still same result. has managementeventwatcher gone away?

you missing assembly reference system.management.dll. using statement brings names scope, save typing prefix: doesn't add dll reference project.

if have added reference , didn't include using system.management in class gets error message. if include using system.management in class , didn't include it's reference project, similar error message. have add reference of system.management.dll project have shown below.


go solution explorer, , expand project, right click on references folder/option , select add references context menu. select .net tab , select system.management list , click ok.

in case if have vs2010, vs2012, vs2013... add reference right click on references folder/option , select add references context menu. select assemblies , framework tab , select system.management list , click ok.

enter image description here


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -