使用.Net Core 3.0访问SerialPort类

编程入门 行业动态 更新时间:2024-10-25 13:29:51
本文介绍了使用.Net Core 3.0访问SerialPort类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在启动一个新的.NET Core 3.0项目,在其中我需要访问System.IO.Ports.SerialPort类.我正在该课程上阅读的文档表明它适用于.NET Core 3(请参阅

I'm starting a new .NET Core 3.0 project in which I need to access the System.IO.Ports.SerialPort class. The documentation I'm reading on the class shows that it is applicable to .NET Core 3 ( see the bottom of docs.microsoft/en-us/dotnet/api/system.io.ports.serialport?view=netcore-3.0 ). However when I add a using statement to my class it isn't able to resolve System.IO.Ports. Is there some additional step that needs to be done to reference the SerialPort class for a .NET Core 3.0 program running on the Windows desktop?

解决方案

Found the answer a few moments after I posted this question. To use the SerialPort class there is an additional package that needs to be installed. I was able click QuickActions icon to install the package.

更多推荐

使用.Net Core 3.0访问SerialPort类

本文发布于:2023-11-14 13:58:22,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1587406.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Core   Net   SerialPort

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!