Functions & Classes not (properly) defined

Hello All,

I’m learning to pay attention to the red underlined code before even attempting to run scripts. Upon looking at the changes in the lecture project my line 1 was missing so I added “using System” but I noticed that the class MonoBehaviour isn’t defined along the majority of the remaining code where is the defining code supposed to be? why is it missing?? what am I doing to generate these errors???

EDIT: after doing some digging and paying closer attention to the generated errors I discover: “\Microsoft.CSharp.Core.targets” seems to be missing!?

Hi narosis,

First of all, try to restart Unity and Visual Studio. If that does not fix the issue, please watch lecture “Fixing Visual Studio Problems” (currently #7).

sometimes I wonder if you’re a bot simply because most of your replies reference the same video/method which I have already tried [no worries Just teasing about you being a bot] after digging through my MSBUILD I discover that “Microsoft.CSharp.Core.targets” is located under a directory [Roslyn] that my installation [macOS 10.14] is not referencing properly if at all. I could make a symbolic link to this file but I want a proper fix rather than a temporary one.

I’m neither a bot, nor a clairvoyant, so I usually suggest first what works for most students before trying to become more creative. :wink:

Unfortunately, I don’t have a Mac, just a PC. Since I don’t know if you already looked for solutions on the internet and if you read any other threads, I’m just linking what I found:

I would uninstall the MONO framework and install the suggested version 5.18.1.3. If that did not fix it, I would uninstall VS and reinstall it. Maybe update VS.

Thanks much, I will give your suggestions a try tomorrow. i’m tired and in need of a break… Thank you for you assistance [Seriously] and I’ve decided if I continue to run into issues I’ll just move my projects to my windows PC or Laptop as I’d much rather be “on the same page” as most of the other students, being on a mac I seem to stick out like a sore thumb when blending in is my goal. Thank you again, have a great night (wash your hands)!

EDIT: Your suggestion was on point! functions, classes, and methods are now being properly defined and there are no more compiler errors. Thank you for your assistance again!! Until the next time :+1: :vulcan_salute:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms