Replies: 3 comments 2 replies
-
@peterfoot I have NET 6 installed on Ubuntu but I got this exception :
|
Beta Was this translation helpful? Give feedback.
-
That error suggests that your project has built in the .NET Standard dll. What .NET version does your project target? |
Beta Was this translation helpful? Give feedback.
-
It's the project file which determines what dependencies are used, rather than the runtime version on your machine e.g.
This pulls in the .net7.0 version of the dll in the NuGet package. The targetframework needs to be net.60 or net7.0 for the library to work on linux. |
Beta Was this translation helpful? Give feedback.
-
There isn't a separate platform identifier for Linux for NuGet packages so currently the generic .NET6.0 and .NET7.0 assemblies contain only the Linux implementation. For Windows you need to ensure your consuming project targets a Windows specific platform. The Linux implementation is not yet complete so there are some limitations with using it. The main one being a lack of support so far for SDP querying so in order to connect a BluetoothClient you need to know the numerical port (channel) to connect to the service of choice. For some devices this is hard-coded as port 1 for a single Serial Port peripheral but you cannot assume this without investigating the target device. The following snippet shows how to connect with a specific port (the UUID is currently ignored but will eventually be implemented):-
Beta Was this translation helpful? Give feedback.
All reactions