在 .NET Core 1.1 中使用 System.IO.Ports.SerialPort [英] Using System.IO.Ports.SerialPort in .NET Core 1.1
问题描述
我正在尝试使用带有 .Net Core 的 Visual Studio 代码创建一个控制台应用程序并获取所有可用端口.如何使用 System.IO.Ports.SerialPort
class 在 Visual Studio 代码中?我尝试使用 using
语句声明它,但唯一可用的是命名空间 System.IO
中的 Compression
和 MemoryMappedFiles
.
I'm trying to create an console application using visual studio code with .Net Core and get all available ports. How to use System.IO.Ports.SerialPort
class in visual studio code?
I try to declare it with using
statement but the only available is Compression
and MemoryMappedFiles
in namespace System.IO
.
我使用的是 .Net Core 1.1.1 SDK
I'm using .Net Core 1.1.1 SDK
推荐答案
对于几年后来到这篇文章的人...
For those coming to this post some years later...
从 .NET Core 2.0 开始,可以使用 System.IO.端口
包.
Since .NET Core 2.0 it's possible to use the System.IO.Ports
package.
这篇关于在 .NET Core 1.1 中使用 System.IO.Ports.SerialPort的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!