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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Nefarius.Drivers.WinUSB" Version="5.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nefarius.Drivers.WinUSB" Version="5.4.0" />
                    
Directory.Packages.props
<PackageReference Include="Nefarius.Drivers.WinUSB" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Nefarius.Drivers.WinUSB --version 5.4.0
                    
#r "nuget: Nefarius.Drivers.WinUSB, 5.4.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Nefarius.Drivers.WinUSB@5.4.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Nefarius.Drivers.WinUSB&version=5.4.0
                    
Install as a Cake Addin
#tool nuget:?package=Nefarius.Drivers.WinUSB&version=5.4.0
                    
Install as a Cake Tool

Nefarius.Drivers.WinUSB

.NET .NET Standard 2.0 .NET 4.7.2 .NET 4.8 .NET 6/7/8/10 NuGet Version NuGet

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 WinUSBNet project by Thomas Bleeker and contributors.

Changes of this fork

  • Replaced P/Invoke code with source generators
  • Changed namespace to Nefarius.Drivers.WinUSB to avoid conflicts with the origin library
  • Removed device notification listener as my other lib Nefarius.Utilities.DeviceManagement provides a drop-in replacement without depending on WinForms or WPF
  • Added USBDevice::GetSingleDeviceByPath to allow opening a WinUSB device via device path (symbolic link)

Documentation

Link to API docs.

Generating documentation

  • dotnet build -c:Release
  • dotnet tool install -g Nefarius.Tools.XMLDoc2Markdown
  • xmldoc2md .\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
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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