[Solved]Autocomplete in Visual Studio Won't Work, Please Help!

sooo , i created a new project , and everything was fine until i created the first script, i can’t auto compelete , and the name of unity objects and functions (transform,vector3,start function,update function… and all of other types) are not highlighted[as you can see in the screen shot below], everything is fine and working if i load a script from another project.

I fainally solved it , the problem was the two projects in the sloution expolrer , i just deleted them , then walllllah , it’s works now , thanks guys for your help.
108731-n02.png

You might have a setting wrong. ‘External Script Editor’ should be set to a Visual Studio install. It should be located here, in Unity:

Edit > Preferences > External Tools -

Look at the drop box bellow the Spawn.cs, it reads Miscelanious Files, this means that this script is not linked to your unity project, this can happen for many reasons and usually it’s solved by just closing and opening the VS again, but my guess is that you already tried that.


Another reason is that for some reason unity is not reconizing the Visual Studio Tools for Unity, if you did not tried yet, you can dowload it and reinstal.


Another option is just select the script in the VS, right click it and select properties, they will then show up in a new box in the right corner, look for the drop box “Build Action” saying “Compile” change it to “None” and than back to “Compile”


There is also this answer on StackOverflow. When this happend to me this solution didin’t work, but it may work for you:

https://stackoverflow.com/questions/36350313/visual-studio-with-unity3d-wont-work-like-it-used-to-be


By the way, the one that worked for me was changing the Build Action.

what program are you using for scripts? if is visual studio, when open the file, look at there.

alt text

It must say your project name. if it says Miscelaneous files, it will be “outside” your project.

Better way is:

-copy the script to a notepad

-close Visual studio

-delete the script from unity

-create a new script in Unity with same name

-open the script from unity (it opens Visual studio)

-Paste the script

And look if it says Mikscelaneous files or not

What fixed it for me was downloading and installing .NET Framework 4.6.1 Developer Pack. There was a popup when first launching VS saying something about version differences. I ignored it because I didn’t understand it, and it implied things would continue to work, but that I may choose to upgrade. Turns out I needed to upgrade to make code completion work, and “could not navigate to symbol under caret” disappear.