C# intellisense not properly working when I make a new script file in VSCode

46 views Asked by At

I'm working with Unity Engine, and I'm using VSCode as the external code editor. But the problem is, whenever I make a new script file in VSCode, not Unity, then extensions(intellisense) stops helping me in the created file.

Weird part: If I make a new script file in Unity's folder explorer, then VSCode intellisense does work correctly.

I guess it is because just creating a new file in VSCode doesn't update the project file, and if I create a new file in Unity, then it updates project file automatically for me.(IDK really)

Is there any way that I can try to make intellisense working even if I create a new file in VSCode?

1

There are 1 answers

1
Jonel Albuquerque On

There are a few things to try to get it to work:

  • Delete the /.vs/ folder
  • Delete the /bin/ and /obj/ folders

After doing either of these (each are separate fix options), restart VSCode and see if it works. If you need a little more detail, I got it from: https://www.ryadel.com/en/visual-studio-intellisense-stops-working-new-file-error-fix/