Device.Net icon indicating copy to clipboard operation
Device.Net copied to clipboard

Is the example code in the read-me out of date?

Open davepruitt opened this issue 1 year ago • 1 comments

I just created a brand new project (a Windows console app using .NET 8.0), and I installed Device.NET using nuget.

I just tried to implement the example code that is in the read-me:

var usbFactory =
                new FilterDeviceDefinition(vendorId: 0x1209, productId: 0x53C1, label: "Trezor One Firmware 1.7.x")
                .CreateWindowsUsbDeviceFactory(loggerFactory);

The function CreateWindowsUsbDeviceFactory does not exist.

Any suggestions as to how to proceed?

davepruitt avatar Nov 21 '24 18:11 davepruitt

CreateWindowsUsbDeviceFactory is an extension method for FilterDeviceDefinition and is defined in the Usb.Net package. You need to make sure the nuget package is added to a project and import extension with using Usb.Net.Windows.

vnau avatar Nov 21 '24 22:11 vnau