System.IO.Ports 8.0.0

The ID prefix of this package has been reserved for one of the owners of this package by Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package System.IO.Ports --version 8.0.0
NuGet\Install-Package System.IO.Ports -Version 8.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="System.IO.Ports" Version="8.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add System.IO.Ports --version 8.0.0
#r "nuget: System.IO.Ports, 8.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install System.IO.Ports as a Cake Addin
#addin nuget:?package=System.IO.Ports&version=8.0.0

// Install System.IO.Ports as a Cake Tool
#tool nuget:?package=System.IO.Ports&version=8.0.0


System.IO.Ports package provides synchronous serial port file resource. Additionally, the functionality of this class can be wrapped in an internal Stream object, accessible through the BaseStream property, and passed to classes that wrap or use streams.

Key Features

  • synchronous and event-driven I/O
  • access to pin and break states
  • access to serial driver properties
  • access to Stream object through the BaseStream property

How to Use

using System.IO.Ports;

// Provides list of available serial ports
string[] portNames = SerialPort.GetPortNames();

// First available port
string myPortName = portNames[0];
int baudRate = 9600;

SerialPort sp = new SerialPort(myPortName, baudRate);
sp.WriteLine("Hello World!");

Main Types

The main type provided by this library is:

  • SerialPort

Additional Documentation

Feedback & Contributing

System.IO.Ports is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (501)

Showing the top 5 NuGet packages that depend on System.IO.Ports:

Package Downloads
Microsoft.Windows.Compatibility The ID prefix of this package has been reserved for one of the owners of this package by

This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET as well as .NET Standard.


什么是HSL? 这是一个基于工业物联网,计算机通讯的架构实现,集成了工业软件开发的大部分的基础功能实现,比如三菱PLC通讯,西门子PLC通讯,欧姆龙PLC通讯,modbus通讯,AB PLC,基恩士PLC,台达PLC,松下PLC,GE PLC通讯等等,这些通讯全部进行了多语言的实现,当然,主打的 .net 库的功能集成还更加的强大,除此之外,还实现了跨程序,跨语言,跨平台的通讯,让你不再纠结于使用windows还是 linux系统,实现了日志功能,流水号生成功能,邮件发送功能,傅立叶变换功能,等等,将来会集成更多的工业环境常见功能的实现。 为了不让工业4.0只停留在口号上,万丈高楼平地起,而基石就是HSL。 HSL能干什么? HSL能将工业生产现场的设备进行万物互联,将数据在底层自由的传输,无论是主动的还是被动的,无论你的采集系统是什么(通常采集系统为windows电脑,或是嵌入式系统,或是基于linux的盒子), 都可以实现数据的随意传输,方便快速实现强大,实时,高响应的健壮系统,无论您是构建C/S系统,还是B/S系统,还是C-B-S-A(集成桌面客户端,浏览器,安卓)混合系统,都是快速而且低成本的实现, 只要拥有了工业现场的一手数据,即可以搭建强大的实时监视功能的软件,生产报表及自动化排产的软件,各种工艺参数历史追踪的软件,基于数据经验的机器学习软件,以及全功能等等。 顺便聊聊 ,传统的工业模式都是采购现成的工业软件,包括上位机软件及MES系统,而忽视了自身的研发能力。对于一些行业标准的功能软件来说,比如ERP系统,财务软件,这些可以直接采购即可, 但是对于上位机及MES系统而言,各个企业的实际需求千差万别,难以有通用的场景,而目前的现状都是花大钱办小事,所以在此处,给出一条面向未来的模式实现:对于生产企业而言, 基于HSL开发企业级MES系统实现,作为数据的核心仓库中心,及业务逻辑处理中心;对于设备供应商而言,基于HSL开发上位机软件系统,快速且方便的将数据分发至客户的MES系统,进行协同工作。 企业合作: 欢迎企业客户联系合作,包括开发新的协议支持,培训及指导上位机软件及MES系统的开发,指导工厂智能化升级改造及信息化团队建设。


Libraries to drive ID Tech devices. Targeted frameworks include .Net 4.8, .Net Standard 2.1, Net 6.0, Net 7.0, and Net 8.0


Provides interfaces, abstractions and common functions which is the essence of Carbon Kit.

nanoFramework.Tools.FirmwareFlasher The ID prefix of this package has been reserved for one of the owners of this package by

.NET nanoFirmwareFlasher tool to flash firmware images to target devices.

GitHub repositories (51)

Showing the top 5 popular GitHub repositories that depend on System.IO.Ports:

Repository Stars
Libre Hardware Monitor, home of the fork of Open Hardware Monitor
Unofficial Galaxy Buds Manager for Windows and Linux
Cosmos is an operating system "construction kit". Build your own OS using managed languages such as C#, VB.NET, and more!
One Remote Access Manager to Rule Them All
Bridges the worlds of .NET with the native APIs of macOS, iOS, tvOS, and watchOS.
Version Downloads Last updated
9.0.0-preview.1.24080.9 1,496 2/13/2024
8.0.0 801,775 11/14/2023
8.0.0-rc.2.23479.6 12,623 10/10/2023
8.0.0-rc.1.23419.4 19,152 9/12/2023
8.0.0-preview.7.23375.6 9,691 8/8/2023
8.0.0-preview.6.23329.7 2,581 7/11/2023
8.0.0-preview.5.23280.8 3,084 6/13/2023
8.0.0-preview.4.23259.5 11,395 5/16/2023
8.0.0-preview.3.23174.8 20,268 4/11/2023
8.0.0-preview.2.23128.3 13,061 3/14/2023
8.0.0-preview.1.23110.8 10,561 2/21/2023
7.0.0 4,512,676 11/7/2022
7.0.0-rc.2.22472.3 9,603 10/11/2022
7.0.0-rc.1.22426.10 63,182 9/14/2022
7.0.0-preview.7.22375.6 44,619 8/9/2022
7.0.0-preview.6.22324.4 1,757 7/12/2022
7.0.0-preview.5.22301.12 2,068 6/14/2022
7.0.0-preview.4.22229.4 11,453 5/10/2022
7.0.0-preview.3.22175.4 4,359 4/13/2022
7.0.0-preview.2.22152.2 14,397 3/14/2022
7.0.0-preview.1.22076.8 3,050 2/17/2022
6.0.2-mauipre.1.22102.15 1,520 2/15/2022
6.0.2-mauipre.1.22054.8 8,439 1/19/2022
6.0.0 9,296,952 11/8/2021
6.0.0-rc.2.21480.5 5,820 10/12/2021
6.0.0-rc.1.21451.13 34,452 9/14/2021
6.0.0-preview.7.21377.19 3,777 8/10/2021
6.0.0-preview.6.21352.12 3,394 7/14/2021
6.0.0-preview.5.21301.5 8,358 6/15/2021
6.0.0-preview.4.21253.7 20,614 5/24/2021
6.0.0-preview.3.21201.4 8,944 4/8/2021
6.0.0-preview.2.21154.6 9,064 3/11/2021
6.0.0-preview.1.21102.12 6,536 2/12/2021
5.0.1 1,719,149 3/9/2021
5.0.0 19,348,406 11/9/2020
5.0.0-rc.2.20475.5 9,609 10/13/2020
5.0.0-rc.1.20451.14 6,157 9/14/2020
5.0.0-preview.8.20407.11 8,316 8/25/2020
5.0.0-preview.7.20364.11 29,762 7/21/2020
5.0.0-preview.6.20305.6 7,555 6/25/2020
5.0.0-preview.5.20278.1 4,294 6/10/2020
5.0.0-preview.4.20251.6 8,166 5/18/2020
5.0.0-preview.3.20214.6 37,817 4/23/2020
5.0.0-preview.2.20160.6 17,181 4/2/2020
5.0.0-preview.1.20120.5 829 3/16/2020
4.7.0 8,379,941 12/3/2019
4.7.0-preview3.19551.4 4,779 11/13/2019
4.7.0-preview2.19523.17 12,196 11/1/2019
4.7.0-preview1.19504.10 10,526 10/15/2019
4.6.0 2,271,186 9/23/2019
4.6.0-rc1.19456.4 4,903 9/16/2019
4.6.0-preview9.19421.4 3,405 9/4/2019
4.6.0-preview9.19416.11 419 9/4/2019
4.6.0-preview8.19405.3 9,762 8/13/2019
4.6.0-preview7.19362.9 12,314 7/23/2019
4.6.0-preview6.19303.8 61,521 6/12/2019
4.6.0-preview6.19264.9 404 9/4/2019
4.6.0-preview5.19224.8 29,906 5/6/2019
4.6.0-preview4.19212.13 4,257 4/18/2019
4.6.0-preview3.19128.7 19,815 3/6/2019
4.6.0-preview.19073.11 15,122 1/29/2019
4.6.0-preview.18571.3 13,038 12/3/2018
4.5.0 8,884,790 5/29/2018
4.5.0-rc1 41,021 5/6/2018
4.5.0-preview2-26406-04 15,856 4/10/2018
4.5.0-preview1-26216-02 27,722 2/26/2018
4.5.0-preview1-25914-04 290,570 11/15/2017
4.4.0 150,136 8/11/2017
4.4.0-preview2-25405-01 2,018 6/27/2017
4.4.0-preview1-25305-02 1,647 5/9/2017