Nefarius.Drivers.WinUSB
5.4.0
Prefix Reserved
dotnet add package Nefarius.Drivers.WinUSB --version 5.4.0
NuGet\Install-Package Nefarius.Drivers.WinUSB -Version 5.4.0
<PackageReference Include="Nefarius.Drivers.WinUSB" Version="5.4.0" />
<PackageVersion Include="Nefarius.Drivers.WinUSB" Version="5.4.0" />
<PackageReference Include="Nefarius.Drivers.WinUSB" />
paket add Nefarius.Drivers.WinUSB --version 5.4.0
#r "nuget: Nefarius.Drivers.WinUSB, 5.4.0"
#:package Nefarius.Drivers.WinUSB@5.4.0
#addin nuget:?package=Nefarius.Drivers.WinUSB&version=5.4.0
#tool nuget:?package=Nefarius.Drivers.WinUSB&version=5.4.0
Nefarius.Drivers.WinUSB
Managed wrapper for the WinUSB APIs on Microsoft Windows.
The package includes assets for .NET Standard 2.0, .NET 6/7/8/10 (Windows), and .NET Framework 4.7.2/4.8. Referencing it
from a generic TFM such as net10.0 selects the .NET Standard 2.0 compatibility asset and avoids NU1701. Runtime use
is still Windows-only: invoking WinUSB APIs outside Windows is unsupported and will fail.
.NET Framework 4.7.2 or later is the recommended Framework target. .NET Framework 4.7.1 can consume the .NET Standard 2.0 asset, but is not a first-class supported runtime.
This is a fork of the fantastic
WinUSBNetproject by Thomas Bleeker and contributors.
Changes of this fork
- Replaced P/Invoke code with source generators
- Changed namespace to
Nefarius.Drivers.WinUSBto avoid conflicts with the origin library - Removed device notification listener as my other
lib
Nefarius.Utilities.DeviceManagementprovides a drop-in replacement without depending on WinForms or WPF - Added
USBDevice::GetSingleDeviceByPathto allow opening a WinUSB device via device path (symbolic link)
Documentation
Generating documentation
dotnet build -c:Releasedotnet tool install -g Nefarius.Tools.XMLDoc2Markdownxmldoc2md .\bin\net8.0-windows\Nefarius.Drivers.WinUSB.dll .\docs\
TO-DOs
- Migrate all buffers to Spans where possible
- More/better tests 😇
Features
Taken verbatim from the source repository.
- MIT licensed with C# source code available (free for both personal and commercial use)
- CLS compliant library (usable from all .NET languages such as C#, VB.NET and C++.NET)
- Synchronous and asynchronous data transfers
- Support for 32-bit and 64-bit Windows versions
- Support for multiple interfaces and endpoints
- Intellisense documentation
Related documentation
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net6.0-windows7.0 is compatible. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net7.0-windows7.0 is compatible. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net8.0-windows7.0 is compatible. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net10.0-windows7.0 is compatible. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 is compatible. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.7.2
- System.Memory (>= 4.6.3)
- System.Runtime.CompilerServices.Unsafe (>= 6.1.2)
-
.NETFramework 4.8
- System.Memory (>= 4.6.3)
- System.Runtime.CompilerServices.Unsafe (>= 6.1.2)
-
.NETStandard 2.0
- System.Memory (>= 4.6.3)
- System.Runtime.CompilerServices.Unsafe (>= 6.1.2)
-
net10.0-windows7.0
- No dependencies.
-
net6.0-windows7.0
- No dependencies.
-
net7.0-windows7.0
- No dependencies.
-
net8.0-windows7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Nefarius.Drivers.WinUSB:
| Repository | Stars |
|---|---|
|
CircumSpector/DS4Windows
A reimagination of DS4Windows.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 5.4.0 | 53 | 8/30/2026 |
| 5.4.0-pre001 | 50 | 8/29/2026 |
| 5.3.0 | 451 | 2/12/2026 |
| 5.3.0-pre001 | 123 | 1/15/2026 |
| 5.2.0 | 892 | 6/18/2025 |
| 5.1.0 | 1,007 | 10/13/2024 |
| 5.0.1 | 275 | 10/1/2024 |
| 5.0.1-pre001 | 187 | 10/1/2024 |
| 5.0.0 | 362 | 8/5/2024 |
| 5.0.0-pre002 | 158 | 8/3/2024 |
| 5.0.0-pre001 | 180 | 8/1/2024 |
| 4.3.83 | 805 | 4/21/2023 |
| 4.2.75 | 727 | 1/4/2023 |
| 4.1.71 | 643 | 10/17/2022 |
| 4.0.64 | 611 | 10/11/2022 |
| 3.0.58 | 606 | 9/28/2022 |
| 3.0.6 | 592 | 5/30/2022 |
| 3.0.3 | 611 | 5/30/2022 |