开发者

ManagementBaseObject not found

开发者 https://www.devze.com 2022-12-16 19:03 出处:网络
Hi I\'m having a problem implementing this method. I have added using System.Management but the class still doesn\'t work.

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

精彩评论

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