Home All Groups Group Topic Archive Search About

Missing - Imports System.Management

Author
17 Feb 2006 4:48 PM
Jason
I'm trying to work with the WMI class in the System.Management
namespace with Visual Basic.Net. I copied and pasted some example code
from Microsoft that contains the following namespace imports:

Imports System
Imports System.Management
Imports ROOT.CIMV2.Win32

Visual Studio does not recognize the System.Management namespace nor
the ROOT.CIMV2.Win32 namespace. They are not listed in Intellisense
listings either.

I'm using the Microsoft Visual Studio .NET 2003 Professional version.

I know I'm probably missing something fundamental but I can't seem to
find it. Any help is *greatly* appreciated.

Author
17 Feb 2006 5:08 PM
Jason
Found the fix.

From the menu bar Project --> Project --> Add Class


Show quoteHide quote
"Jason" <ja***@someone.com> wrote in message
news:%237IUCI%23MGHA.916@TK2MSFTNGP10.phx.gbl...
> I'm trying to work with the WMI class in the System.Management
> namespace with Visual Basic.Net. I copied and pasted some example code
> from Microsoft that contains the following namespace imports:
>
> Imports System
> Imports System.Management
> Imports ROOT.CIMV2.Win32
>
> Visual Studio does not recognize the System.Management namespace nor
> the ROOT.CIMV2.Win32 namespace. They are not listed in Intellisense
> listings either.
>
> I'm using the Microsoft Visual Studio .NET 2003 Professional version.
>
> I know I'm probably missing something fundamental but I can't seem to
> find it. Any help is *greatly* appreciated.
>
>
Author
17 Feb 2006 5:23 PM
Herfried K. Wagner [MVP]
"Jason" <ja***@someone.com> schrieb:
> I'm trying to work with the WMI class in the System.Management
> namespace with Visual Basic.Net. I copied and pasted some example code
> from Microsoft that contains the following namespace imports:
>
> Imports System
> Imports System.Management

Are you sure your project contains a reference to "System.Management.dll"?

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>