badcel / HidApi.Net

A modern cross platform C# binding for HIDAPI
https://badcel.github.io/HidApi.Net/
MIT License
36 stars 7 forks source link

Provide support for a NET Standard 2.0 #82

Closed alextnull closed 9 months ago

alextnull commented 9 months ago

Provide support for a NET Standard 2.0

badcel commented 9 months ago

Hi, I'm not sure if this will ever happen as I want to keep the code simple and modern.

So for example if dotnet 6 goes out of support it will probably be dropped, too. (There is already duplicated code to keep support for dotnet 6. Supporting net standard would probably increase this even more.)

If you need support for dotnet framework I think there are other nuget packages available.

badcel commented 9 months ago

So my recommendation in this case is to multi target your app / library and conditionally reference different nuget packages. Then create some abstraction layer which supports both packages and allows your app to use whichever binding is available.

This separates your dependencies cleanly from your core logic which should be desired anyway.

alextnull commented 9 months ago

OK, I decided to go with fork for now.