How to solve Missing directive or assembly reference using WMI ManagementObjectSearcher?

To solve:Missing directive or assembly reference using WMI ManagementObjectSearcher?

The solution is below:

You are missing a reference to the assembly containing
the type ManagementObjectSearcher,It’s into a System.Management namespace

Then following Steps to add System.Management namespace

Step:1-Write click on your Project.
Step:2-Add the reference and add the System.Managment assembly.
Step:3-When you create a new project you have to add System.Management

Hope it work Successfully.

About the Author

avatar