System.IO.Ports only availble on windows, but im using windows - .NET6

Borda Ákos 15 Reputation points
2024-03-17T16:58:29.7233333+00:00

So i'm trying to read arduino serial from c#, but it shows me the folowing exeption when i try to open the port:

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

I am currently using windows 11.

Also i tried setting the target OS to windows in the .csproj file.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,623 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,625 questions
{count} votes