Sandeep Bansal
Sandeep Bansal

Reputation: 6394

ManagementBaseObject not found

Hi I'm having a problem implementing this method.

I have added using System.Management but the class still doesn't work.

The error is:

Error 7 The type or namespace name 'ManagementBaseObject' could not be found (are you missing a using directive or an assembly reference?)

Upvotes: 3

Views: 6060

Answers (3)

Miank
Miank

Reputation: 105

Don't Forget to write using System.Management; after adding the reference some time this happens even after adding the respective assembly it shows the error.

Upvotes: 0

itowlson
itowlson

Reputation: 74802

You are probably missing the assembly reference to System.Management.dll. The using statement just brings names into scope, to save you typing the prefix: it doesn't actually add a DLL reference.

Right-click your project's References folder and choose Add Reference. Go to the .NET tab of the resulting dialog, select System.Management and click OK.

Upvotes: 14

user57508
user57508

Reputation:

did you add System.Management.dll as a reference?

msdn tells us more about where to find ManagementBaseObject:

Namespace: System.Management
Assembly: System.Management (in System.Management.dll)

Upvotes: 2

Related Questions