Working with USB devices in .NET

David Thibault picture David Thibault · Sep 16, 2008 · Viewed 92.4k times · Source

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?

Answer

Sofox picture Sofox · Apr 16, 2010

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.