Adding System.IO.Ports nuget package not working in dotnet standard library

OxygenePortsStandard.zip (10.2 KB)
I’ve created a dotnet standard library in oxygene. I want to use the System.IO.Ports namespace (for SerialPort).
Normally by adding the System.Io.Ports nuget package this is fixed (tried this in a dummy c# project). When I try to add the nuget package in the oxygene project (try in attached dummy project) I get this error:
*Could not install package ‘runtime.linux-arm.runtime.native.System.IO.Ports 4.7.0’. You are trying to install this package into a project that targets ‘.NETStandard,Version=v2.0’, but the package does not *
contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
Is there any workaround for this.
Used version of remobjects Elements: 10.0.0.2456
(also tried with latest version, same issue)

System.IO.Ports is not available for .NET Standard (and for .NET Core)…

It seems that there is another nuget package with serial port support: https://www.nuget.org/packages/NetCoreSerial/

I used 2539 of Fire and that worked ok for me . It says it supports .net standard 2.0

System.IO.Ports (4.7.0) works fine for me, referenced from a .NEt Standard project created fresh from template…

ClassLibrary 1.bugreport.zip (14.4 KB)

The Microsoft documentation must not be up to date: System.IO.Ports Namespace | Microsoft Learn

Was this project made with water? I’ve tried to do thios in water as well. I was able to add the System.IO.Ports nuget package (4.7.0), but if I look deeper into the System.IO.Ports reference, I see issues. The 4 packages under runtilme.native.System.IO.Ports:470 all have issue. The error which the first one shows is: “Package runtime.linux-arm.runtime.native.System.IO.Ports:4.7.0 has no deliverable for platform 'netstandard 2.0”, Which looks a lot like the error I get when I tried to add the nuget package in visual studio.
At first this looks like it is an issue with the nuget package but with the solution I’ve made in C# in visual studio these linux and osx package do not have any issues

That might be fine, though? you’re never actually going to build and run a .NET Standard app (because .NET Standard is not a real runtime). If you use your library from .NET Framework or .NET Core, and the package has a delivery for that, that’ll be used…

Might also just be that VC# doesn’t show such a message, but hits the same scenario? does your VC# project actually get a reference for runtime.linux-arm.runtime.native.System.IO.Ports?

native.System.Io.Ports
in VC# the Packages show up as you see on the attached image.
That being said. In the project where I need this. I’ve opened the project in Water to add the System.IO.Ports nuget package. Then I continue working in visual studio. That seems to work (well it builds). Need to test this properly in the future. If it turns out not to work I’ll send an update to this case.

If merely the adding of the package in VS is the issue, then yes I believe thats a thing we’re still actively working on, getting VS fully over top use “our” way of adding packages.