- 关于"using System.IO.Ports;" 问题
I want to conect with serial port but when I use “using System.IO.Ports;” I take this error I want to conect with serial port but when I use “using System.IO.Ports;” I take this error: I want to conect with serial port but when I use “using System.IO.Ports;” I take this error I want to conect with serial port but when I use “using System.IO.Ports;” I take this error:
错误 1 The type or namespace namePorts' does not exist in the namespace
System.IO’. Are you missing an assembly reference?
The problem is the .net configuration, use the .NET 2.0 (not subset) and will connect.
具体解决方案如下:
Edit>ProjectSettings>Player>ApiCompatibilityLevel> change “.NET 2.0 (subset)” to "NET 2.0"
Then add a new PortControlScript, try