Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
davepruitt opened this issue Nov 21, 2024 · 1 comment
Open

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

davepruitt opened this issue Nov 21, 2024 · 1 comment

Comments

@davepruitt
Copy link

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?

@vnau
Copy link

vnau commented Nov 21, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants