使用 System.IO.Ports 创建 C# Core.NET 项目 [英] Create a C# Core.NET project using System.IO.Ports

查看:44
本文介绍了使用 System.IO.Ports 创建 C# Core.NET 项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建一个 C# Core.NET 项目(以便能够在 Linux 上运行)但是当我使用 Visual Studio 2017 创建我的项目时,我无法使用命名空间 System.IO.Ports,即使它存在在我安装的 Core.NET 2.1.4 中(参见屏幕截图)

我的问题很简单:我应该如何配置我的项目才能使用此功能?

我确切地说我已经在这台计算机上将 System.IO.Ports 用于 Unity3D 项目,但在这种情况下,Unity3D 处理所有 Visual Studio 配置.所以我真的不知道该怎么做,但我知道在这台电脑上是可能的.

解决方案

netstandard/netcore 的许多扩展都是单独的依赖项,使用 nuget 安装.

在这种情况下,您正在寻找这个.>

可以在包管理器控制台使用install-package system.io.ports命令安装

I need to create a C# Core.NET project (to be able to run on Linux) but when I create my project with Visual Studio 2017, I can't use the namespace System.IO.Ports even if it is present in Core.NET 2.1.4 which I installed (cf. screenshots)

My question is simple: how should I configure my project to be able to use this feature?

I precise that I already used System.IO.Ports on this computer for Unity3D projects, but in this case Unity3D handles all the Visual Studio configuration. So i really don't know how to do, but I know that it is possible on this computer.

解决方案

Many of the extensions to netstandard/netcore are separate dependencies, installed using nuget.

In this case you're looking for this one.

It can be installed using the command install-package system.io.ports in the package manager console

这篇关于使用 System.IO.Ports 创建 C# Core.NET 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆