stackuser
stackuser

Reputation: 198

Error while working with Unity. No solution worked.. error CS0234: The type or namespace name `Ports' does not exist in the namespace `System.IO'

I have just started working on Arduino-Unity interfacing, but i am facing this error.

using UnityEngine;
using System.IO.Ports;

I dont think there's some problem in the code. Also I have tried changing API Compatibility Level to .NET 2.0 But that did not worked for me.

Upvotes: 2

Views: 784

Answers (1)

Programmer
Programmer

Reputation: 125425

Also I have tried changing API Compatibility Level to .NET 2.0 But that did not worked for me.

1. Change API Compatibility Level to .NET 2.0

2. Save Unity Project, close Unity then restart Unity.

3. Close Visual Studio or MonoDevelop depending on which one is installed

4. Restart Visual Studio or MonoDevelop

Done! Sometimes, you don't need to do step 2. Step 1,3 and 4 should solve this problem.

Upvotes: 2

Related Questions