Is System.IO.Ports currently only support on Windows(using MAUI build)

준섭 김 0 Reputation points
2023-11-30T04:57:36.8533333+00:00

Hello,

I'm trying to develop some application with serial communication function on mac and Windows using MS's .Net MAUI for cross platform development. The same code works windows like open/close a port, send data read data, everything works perfectly. But, on the other hand, on Mac OS, It throws only "System.IO,Ports is currently only supports on Windows" message. A target platform of this project is net6.0-maccatalyst for mac. I succeed on building a console app using net 6.0 with System.IO.Ports and it works well. Only it isn't work with the MAUI build targeted to mac catalyst.

Developer technologies | .NET | .NET MAUI
{count} votes

1 answer

Sort by: Most helpful
  1. JessieZhang-MSFT 7,716 Reputation points Microsoft External Staff
    2023-12-01T07:56:15.6866667+00:00

    Hello,

    Yes, System.IO,Ports is currently only supports on Windows.

    And there are some relative issues about this problem, you can check them here: SerialPort is not supported on Mac Catalyst and SerialPort is not supported on Android .

    Best Regards,

    Jessie Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.