Ocaccy Pontes
Ocaccy Pontes

Reputation: 257

Why can't use ManagementObjectSearcher in VS2010 C#

I'm trying to use the code from this post: get com port number of an USB adapter

Then I got this message: why? enter image description here

Upvotes: 7

Views: 16338

Answers (1)

Rajesh Subramanian
Rajesh Subramanian

Reputation: 6490

You have to add a reference to System.Management Manually through VS 2010.

  1. Right Click on Project, Add References

  2. Select the Assemblies Tab and Search for System.Management . Then Add Reference.

Upvotes: 35

Related Questions