- Home /
Type or Namespace 'Ports' does not exist in System.IO
My Unity3D Version: 2017.3.0f3 Personal
I am communicating with my programm with a serial port. It works well in the Player Editor, using Unity. But when I want to compile it to deploy it to my HoloLens, it doesn't.
I get the error message: The type or namespace name 'Ports' does not exist in the namespace 'System.IO' (are you missing an assembly reference?)
I've tried so far:
Changed Configuration to .NET 2.0
Reimported the whole project
Downloaded and Added system.dll manually to the assets
I've searched almost the whole i-net, but nothing worked for me. I even looked on japanese/chinese website using google translator they always say the same (-> .NET 2.0)
I would be very grateful for your help!
Edit1: I tried also #if NETFX_CORE -mycode- #endif
I'm sorry to hear that, I'm a local game person but I've also haven't found anything useful to help solve this problem with that you haven't mentioned. I think your best bet is to contact unity themselves unless someone else knows a way.
Answer by Zodiarc · Feb 14, 2018 at 08:06 AM
My guess is that it's not being added to the build. Try this: https://docs.unity3d.com/Manual/UsingDLL.html
Like mentioned in the question -> Hololens (UWP Application)
Answer by samra2494 · Jun 10, 2020 at 08:01 AM
Go to Edit->projectsettings->Player->APIcompetibilityLevel = .Net4.x This worked for me.