Reputation: 6394
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
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
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