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

0
0

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

 

  • You must to post comments
0
0

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

  • You must to post comments
0
0
  • Nico Henn
    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.
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.