开发者

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 开发者_如何学JAVAmissing a using directive or an assembly reference?)


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.


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)


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜