VS Code and Serial Port (solved)

cabwav 6 Reputation points
2022-10-23T22:31:47.68+00:00

Hello

I am new to Visual Studio Code and I am trying to write a C# console program that reads data from a serial port. How do I access the serial port from code? Using System.IO does not contain a reference to Ports.

My apologies for my poor english. Thank you in advance.

VS Code 1.72.2

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
38,830 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. cabwav 6 Reputation points
    2022-10-24T16:10:14.21+00:00

    Nvm, I found a way to add a SerialPort:
    Terminal -> dotnet add package system.io.ports

    1 person found this answer helpful.
    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.