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,904 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,995 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

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.