Skip to content
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

Using both InTheHand.Net.Bluetooth and InTheHand.BluetoothLE in a netX-windows application. #417

Open
dotnet555 opened this issue May 4, 2024 · 0 comments

Comments

@dotnet555
Copy link

Hi,
I have the problem that I need to use both the BluetoothClient class (from InTheHand.Net.Bluetooth) and the Bluetooth static class (from InTheHand.BluetoothLE) in a net8-windows project.

This is a rundown of my experience:

  • Added the InTheHand.Net.Bluetooth package, and used the BluetoothClient class succesfully
  • Added the InTheHand.BluetoothLE package, and tried to use the Bluetooth static class: got the exception "No path specified for UNIX transport"
  • As suggested elsewhere, targeted my project from net8-windows to net8.0-windows10.0.22621.0
  • Now the Bluetooth static class works, but the BluetoothClient class stopped working.
  • ... a lot of banging the head against a brick wall...
  • Got a working solution:
    • Main project targeting net8.0-windows10.0.22621.0
    • Local cloned copy of InTheHand.BluetoothLE targeting only net8.0-windows10.0.22621.0, removing all the compilation conditions and leaving only the "Windows" folder under "Platforms", and making the necessary changes to make the code use the "Windows" classes.
    • Local cloned copy of InTheHand.Net.Bluetooth targeting only net8.0-windows10.0.22621.0, removing all the compilation conditions and leaving only the "Win32" folder under "Platforms", and making the necessary changes to make the code use the "Win32" classes.

With this configuration, I got both classes (BluetoothClient and Bluetooth) to work correctly.

So, my question is: there is any way to obtain the same behavior (net80-windows application, with InTheHand.BluetoothLE using the "Windows" folder and InTheHand.Net.Bluetooth using the "Win32" folder) using NuGet packages instead of using a modified local copy of the source code?

Thanks.

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

1 participant