System.Management not found

S

sturnfie

Hey all,

I am hoping this is something simple, but I am at a total loss to
figure out what it is. In a C# application I am writing, the
following is my "using" header block:

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Management;
using System.Management.Instrumentation;

Everything is found just fine, until I get to System.Management and
System.Management.Instrumentation. These are not found and the error
"namespace Management not found in namespace System" is thrown.
Looking at the installed documentation on machine (.NET SDK
documentation), there *does* exist a System.Management. Since this is
static documetnation on my machine, and came with the .NET libraries,
my first assumption is that System.Management should be there.

Anyway have any ideas of how ot approach this? I am currently
downloading the newest verision of the .NET SDK, but would like to
figure out what the heck is going on, in case the upgrade does not
solve the problem.
 
A

Alan Pretre

Everything is found just fine, until I get to System.Management and
System.Management.Instrumentation. These are not found and the error
"namespace Management not found in namespace System" is thrown.

You need to add a Reference to System.Management.

-- Alan
 
S

Siva M

Did you add a refernece to System.Management.dll assembly?

Hey all,

I am hoping this is something simple, but I am at a total loss to
figure out what it is. In a C# application I am writing, the
following is my "using" header block:

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Management;
using System.Management.Instrumentation;

Everything is found just fine, until I get to System.Management and
System.Management.Instrumentation. These are not found and the error
"namespace Management not found in namespace System" is thrown.
Looking at the installed documentation on machine (.NET SDK
documentation), there *does* exist a System.Management. Since this is
static documetnation on my machine, and came with the .NET libraries,
my first assumption is that System.Management should be there.

Anyway have any ideas of how ot approach this? I am currently
downloading the newest verision of the .NET SDK, but would like to
figure out what the heck is going on, in case the upgrade does not
solve the problem.
 
S

sturnfie

Alan said:
You need to add a Reference to System.Management.

-- Alan

I did a search on my machine for System.Management.dll and got a hit.
I added this path to the Project Properties -> Reference Paths but this
does not seem to resolve my problem. The hit I got was to
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322

Am I missing a developer's version of this file? Is there some other
way I am supposed to go about adding this Reference?
 
A

Alan Pretre

I did a search on my machine for System.Management.dll and got a hit.
I added this path to the Project Properties -> Reference Paths but this
does not seem to resolve my problem. The hit I got was to
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322

I assume you are using VS.NET...

The proper way to do this is to go to Add References, then choose the .NET
tab, and select System.Management. You do not use the Browse tab for these
kinds of "System" references.

-- Alan
 
S

sturnfie

Alan said:
The proper way to do this is to go to Add References, then choose the .NET
tab, and select System.Management. You do not use the Browse tab for these
kinds of "System" references.

-- Alan


Thank you Alan, this is exactly what I needed to do.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top