USB Comms in .NET 6.0

FerroCoder

Member
Joined
Jul 20, 2023
Messages
18
Programming Experience
10+
Hi folks,

I am a long-time VC++/MFC developer starting to migrate my very large ( 2+ M-Line) program to C# and .NET 6.0. I have started prototyping this year and, so, have much to learn about C# and .NET.

The program that I am migrating sends requests to, and receives data from, our family of materials testers and accessories that represent as GUID devices to WinUSB. I have been searching for, and failing to find, examples of USB communications through .NET 6.0. I don't understand why Microsoft does not seem to offer a library. There is a UsbDevice class available to UWP projects, but these are apparently incompatible with .NET 6.0. My NuGet searches come up empty.

Can anyone point me to one or two good references on .NET 6.0 USB comms?

Thanks in advance,

FC
 
I've never tried this, but it seems to support .NET (Core):
 
A couple of more matches for search 'usb' at Nuget, both supports .Net (Core) and supports WinUSB:
I have no experience with these or the other either.
 
Thanks again,

I've been having a go with the LibUsbDotNet library. It seems to be too old to use directly as a library, but I have been using it as a reference to try to develop USB I/O functions. I'm stumbling a bit with it and was hoping to find something a little more up-to-date. Usb.Net also appears to target nothing newer than .NET 2.0, but may still serve as a good reference.

I will have a look at winusbnet. It may be just what is needed. I have to mostly set this aside for the time being, so it may be a while before I can have a good look.

FC
 
Usb.Net also appears to target nothing newer than .NET 2.0,

You misread. It targets .NET Standard 2.0. This is a very good cross platform library standard. .NET Standard 2.1 is the only version afterwards, but does not have any major enhancements except to provide new classes that can make performance better assuming that the code takes advantage of them.
 
It looks as though the WinUSB.Net may serve, then. I need to spend some time with it to see. I also clearly need to go back and review my understanding of all of the flavors of .NET.

Thanks,

FC
 

Latest posts

Back
Top Bottom