.net – Working with USB devices in .NET


Using .Net (C#), how can you work with USB devices?

How can you detect USB events (connections/disconnections) and how do you communicate with devices (read/write).

Is there a native .Net solution to do this?

Best Solution

I've tried using SharpUSBLib and it screwed up my computer (needed a system restore). Happened to a coworker on the same project too.

I've found an alternative in LibUSBDotNet: http://sourceforge.net/projects/libusbdotnet Havn't used it much yet but seems good and recently updated (unlike Sharp).

EDIT: As of mid-February 2017, LibUSBDotNet was updated about 2 weeks ago. Meanwhile SharpUSBLib has not been updated since 2004.