The question is answered, right answer was accepted
Error CS0103 UnityEngine does not exist
I recently installed Unity 5.
Whenever I create a new C# script, and attempt to edit it, MonoDevelop gives these two errors:
"error CS0103: The name 'UnityEngine' does not exist in the current context"
"error CS0103: The name 'MonoBehaviour' does not exist in the current context"
I tried uninstalling, deleting all remaining files, and reinstalling. But the problem persists.
How would one go about solving this problem?
The screenshots show exactly what I just told you. But alright, have two. The first screenshot shows the entirety of a new script, and the second screenshot shows one of the errors.
Answer by EEDemir · Jun 24, 2016 at 10:24 PM
In Monodevelop ; Go Project > Assembly CSharp Options > Build > General , and check if the correct Framework is setup. When i change it from 3.5 to 4.5.2 or 4.6.1 it worked out for me, but sometimes when i restarted the Monodevelop it again automaticly changed back to 3.5
Hey there, this did not fix the problem for me. in case someone finds this thread:
I deleted my "Assembly-CSharp" files in my project directory, and reloaded my project. I then right clicked on the CSharp.csproj and opened it with monodevelop. That gave me an error, surprisingly... but I opened it again from monodevelop's recent files and it said that it loaded the solution. After that, this problem went away.
Just want to say thanks for the answer. It solved my problem!
Answer by VortexAlive · Nov 27, 2016 at 10:25 PM
This will fix your problem:
In Monodevelop ; Go Project > Assembly CSharp Options > Build > General , and check if the correct Framework is setup. Change it from 3.5 to 4.5.
I had this problem as well, though it didn't seem to affect anything. Simply changing the framework to 4.5 has fixed it for me.
Thanks! I was totally clueless about my issue up until now.
Answer by danam · Feb 10, 2017 at 09:34 PM
I had this same issue. Every suggestion did not resolve it, even rolling back earlier commits, the problem persisted. Deleted all sln files, no change. The only thing that worked is using Visual Studio instead of monodevelop.