weird false cs0103 error in monodevelop

Not exactly sure why, but all of a sudden when I use a line like


in monodevelop it becomes red, and when i hover over it, i get error CS0103, "StartCoroutine’ does not exist in the current context ". The problem is, it was working before and it STILL works. The Unity editor sees no problem and the project runs fine in spite of monodevelop seeing an error. Everything works, but code is peppered with false errors and its annoying. Any idea what would do this?

See if this helps!

Found the solution, although doesn’t make much sense. I was going over changes I’ve made to the project and one of them was turning was making a class using the AWS sdk. In the examples, they used a namespace, so I kept as well in my new class. I also made it a singleton.

So i removed the reference to singleton and saved, everything went back to normal, I put it back and saved, everything was still normal.

So I am guessing this is some kind of glitch.

Same problem we can generate when we delete elements in project in reference folder. Some place in code will be mark to red.

  1. Easiest way to solve this red kind of problem is to mark in Solution window - one in your solutions(pink icon).
  2. Next from context menu take “Open Containing Folder”.
  3. It probably open directory on disk where is your Unity project (same folder containing Assets, Library, etc).
  4. Close Monodevelop.
  5. Mark in this folder all files with .sln and .csproj extention and delete them.
  6. Open again your script from Unity.