Skip to content

System.IO.Ports not working on Linux all of the sudden #4871

Closed

Description

@itg-assistant

Nico Henn asked 2025-09-28 20:42:42 UTC

Hi, i am using the current version of Visual Studio 2022 and Wisej 3.5,

i am porting vb.net projects from WinForms to Wisej, multiple of them use System.IO.Ports and it works just fine on Linux (Raspbian, Raspberry Pi 3).

However on my current project when loading it in the browser i get the Application Error "System.IO.Ports is currently only supported on Windows.".

This error does not make sense as i am using the same setup (VS2022, Wisej 3.5 and System.IO.Ports and the Raspberry Pi) for multiple other projects i ported with Wisej and it works just fine.

On all these projects i added System.IO.Ports via NuGet in VS2022. 9.0.8 works on a project i just finished last week on the same setup but does not work on this one now. 9.0.9 also doesnt work.

The full error message is:

System.IO.Ports is currently only supported on Windows.

at System.IO.Ports.SerialPort..ctor(IContainer container) at app9.Form1.InitializeComponent() in C:\Users\Rechner\source\repos\app9\app9\Form1.Designer.vb:line 29 at app9.Form1..ctor() in C:\Users\Rechner\source\repos\app9\app9\Form1.vb:line 19 at app9.Program.Main() in C:\Users\Rechner\source\repos\app9\app9\Program.vb:line 14 at InvokeStub_Program.Main(Object, Object, IntPtr*) at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) --- End of stack trace from previous location --- at Wisej.Web.Application.Start() at Wisej.Core.ResponseManager.b__33_0() at Wisej.Core.IWisejSynchronizedImplementation.Lock(IWisejSynchronized target, Action action) at Wisej.Core.ResponseManager.OnLoad(Session session, Object message) at Wisej.Core.ResponseManager.ProcessRequest(ServiceType service, Object message)

Form1.Designer.vb Line 29 is " Me.SerialPort1 = New System.IO.Ports.SerialPort(Me.components)" - again, exactly the same line works fine on a Wisej project i finished with the same setup last week.

Form1.vb Line 19 is just the beginning (  Public Sub New()).

I am using .net 8.0 in all of these projects.

Any ideas on this?

Thanks

Activity

  1. added
    BugSomething is broken or behaving unexpectedly.
    on Jun 16, 2026
  2. itg-assistant commented on Jun 16, 2026

    @itg-assistant
    Author

    Nico Henn answered 2025-09-28 20:52:34 UTC

    interesting but not a solution unfortunately as i am using the same System.IO.Ports version in other wisej projects with the same VS2022 and Wisej setup and all of them with .net 8.0 and it works fine there.

  3. itg-assistant commented on Jun 16, 2026

    @itg-assistant
    Author

    JD answered 2025-09-28 21:29:16 UTC

    Wisej has nothing to do with System.IO. It's a Microsoft library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething is broken or behaving unexpectedly.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions