找不到system.IO.Ports命名空间 [英] Can't find system.IO.Ports namespace

查看:617
本文介绍了找不到system.IO.Ports命名空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨! 

我正在尝试将system.IO.ports命名空间添加到我的项目中。无法找到。

与此处相同的问题:

  https://social.msdn.microsoft.com/Forums/en-US/b26a1796-5340- 4e12-81f7-035cb537fc9b / can-find-systemioports-in-visual-studio-2017?forum = visualstudiogeneral



我尝试创建使用
.NET Framework。仍然无法找到,它甚至不在对象浏览器中。

帮助真的很感激,谢谢

Hi! 
I'm trying to add system.IO.ports namespace to my project. It cannot be found.
Same problem as here:
 https://social.msdn.microsoft.com/Forums/en-US/b26a1796-5340-4e12-81f7-035cb537fc9b/cannot-find-systemioports-in-visual-studio-2017?forum=visualstudiogeneral

I have tried creating project which uses .NET Framework. Still cannot be found, it's not even in object browser.
Help is really apprectiated, thanks

推荐答案

Hi Niko19861,

欢迎来到MSDN论坛。

>>

我尝试过创建使用.NET Framework的项目。仍然无法找到,它甚至不在对象浏览器中。

你使用的是什么版本的Visual Studio?

你使用的是什么.NET Framework项目?

请检查
系统汇编已添加到项目参考列表下。如果没有,请添加它。您可以在解决方案资源管理器中右键单击项目的
参考,选择
添加参考... ,点击浏览
参考管理器对话框中的浏览标签下,找到要添加的"System.dll",它位于路径"C" :\ Program Files(x86)\ Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.dll"。然后,添加命名空间"using System.IO.Ports;",检查结果。

Please check the System assembly has been added under the project References list. If not, please add it. You could right click the References of your project in Solution Explorer, choose Add Reference…, click Browse… under Browse tab in Reference Manager dialog box, find the "System.dll" to add, it located in path "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.dll". Then, add namespace "using System.IO.Ports;", check the result.

如果您想在Universal Window项目中使用串口通信,请查看此主题可能对您有所帮助:
< a href ="https://stackoverflow.com/questions/31124703/using-system-io-ports-c-sharp-windows-iot-univeral">
https://stackoverflow.com/questions/31124703 / using-system-io-ports-c-sharp-windows-iot-univeral

另外,你能否分享一下你的项目?您可以将项目上传到
OneDrive 并在此处分享链接,这将有助于在我身边测试您的问题,找到解决方案。

In addition, could you please share me your project? You could upload your project to OneDrive and share a link here, that will be helpful to test your issue in my side and find the solution.

感谢您的理解。

问候,

Judyzh


这篇关于找不到system.IO.Ports命名空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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