Subscribe to the Inserted and Removed events to be notified when a USB drive is plugged in or unplugged, or when a USB device is connected or disconnected. Usb.Events is a .NET Standard 2.0 library and uses WMI on Windows, libudev on Linux and IOKit on macOS.
Install-Package Usb.Events -Version 18.104.22.168
dotnet add package Usb.Events --version 22.214.171.124
<PackageReference Include="Usb.Events" Version="126.96.36.199" />
paket add Usb.Events --version 188.8.131.52
- System.Management (>= 4.7.0)
This package is not used by any popular GitHub repositories.