C# System.IO.Ports throws System.IO.Ports is currently only supported on Windows, but i'm currently using windows

53 Views Asked by At

I am trying to communicate with an Arduino over serial. The form is using:

using System.IO.Ports;

My code breaks here:

SerialPort mySerialPort = new SerialPort("COM3");

The exception is:

System.PlatformNotSupportedException: 'System.IO.Ports is currently only supported on Windows.

I am currently using Windows 11.

I tried reinstalling system.io.ports, but no success

0

There are 0 best solutions below