Search code examples
.netframeworksusbpinvokemanaged-code

Why does the .NET framework not include USB tools


I am wondering why the .NET framework does not provide any managed methods for working with USB drivers. From everything I have read you still have to call into Windows API's and use marshalling and PInvoke and all that crap that none of us .NET programmers want to have to do. Why does .NET provide methods for communicating with serial ports but not USB ports? USB has become much more widely used that serial ports now, isn't it time they incorporated it into the Framework?


Solution

  • Like all other features in the .Net framework it comes down to cost vs. reward. With every release of .Net the owners have to make very painful cut decisions for features. There are simply too many requests / wants to satsify them all. The ones that are chosen need to provide clear value at a reasonable cost.

    My guess is that Serial Ports, while probably less popular than USB, are simply easier to implement in managed code. Hence even though the use may not be as high, the relative easy of implementing them put them over the top.