CS0246: The type or namespace name 'ManagementObjectSearcher' couldnot be found

  • Thread starter Thread starter CKKwan
  • Start date Start date
C

CKKwan

Dear All,

I have added System.Management as reference, and using
System.Management; in my code.

Everything compile fine (wihtout a single error / warning).

But this error occur during runtime. (Press F5 and run in debug mode).

Any idea what might have gone wrong?

TIA.
 
Dear All,

I have added System.Management as reference, and using
System.Management; in my code.

Everything compile fine (wihtout a single error / warning).

But this error occur during runtime. (Press F5 and run in debug mode).

Any idea what might have gone wrong?

TIA.

That is a compile time error, when you press F5 the project is
compiled AND then run.
Unless you are loading it dynamically of course.
 
Back
Top