WMI: I can't find the reference to namespace root/cimv2

  • Thread starter Thread starter Pablo Garcia
  • Start date Start date
P

Pablo Garcia

I am working with Windows Management Instrumentation (WMI). I must use the
namespace ROOT.CIMV2, I have written "using ROOT.CIMV2.Win32" on the top of
the file, but a compilation error happened because I hadn't Add the
Reference where that namespace is.
If someone knows which is the Reference I must Add to the project, tell me,
please.
Thank you very much.
 
The using part isn't strictly necessary, it's there for ease of use.

In visual studio, right-click on References in Solution Explorer and
choose Add Reference...
Locate the assembly (dll) and add it.

With csc I think you use /reference: WMI.dll or whatever the assembly is
called.
 
WMI namespaces are not .NET FCL namespaces, use the System.Management namespace to include WMI support in your code.
Check the MSDN docs for deatils and samples.

Willy.
 
Back
Top