# Why is the IntelliSense not working when I open a new script in Visual Studio?

The strange thing is that opened scripts or newly opened ones are working fine. It's the new created C# scripts that are not working.

With not working, I mean the MonoBehaviour is not in light blue color it's in black color. In this screenshot I took, I marked it with a red circle.

What have I tried so far? I have closed Visual Studio and started over again. Since it didn't solve it, I closed the unity editor and started it over again, to no avail.

I pressed 'clean solution', I pressed 'rebuild solution', I pressed 'build solution'.

What else can I do ? And why are the other scripts working fine? If I type gameo...it will auto complete it to GameObject but in this specific script it's just not working.

This is a screenshot of the editor. I have in the Hierarchy a Ladder object. In the Assets I created a folder name Ladder and a script name Ladder. But this Ladder script is not working.

This is the Ladder script and this script was working before but once I created another script inside the ladder folder name Raise empty script the Raise script didn't work and now the Ladder is not working either. But other scripts are working fine.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Ladder : MonoBehaviour
{
public Transform charcontroller;

private bool inside = false;
private float heightFactor = 3.2f;

private void OnTriggerEnter(Collider other)
{
inside = true;
}

private void OnTriggerExit(Collider other)
{
inside = false;
}

private void Update()
{
if (inside == true && Input.GetKey("w"))
charcontroller.transform.position += Vector3.up / heightFactor;
}
}


## 8 Answers

The Solution shows that script under "Miscellaneous Files" This suggests that it hasn't been added to the project. Try manually adding it via the Project menu or dragging it into the appropriate area in your Project Explorer pane.

• I didn't see the "Miscellaneous Files". Anyway i solved it with this steps: Go to the file inside Solution Explorer. Right-Click file and select Exclude from project. Right-Click your project/folder where the file was and click add Existing Item, and add the file you just removed back into your project. But i still wonder why it happened and if it will happen again. A bit annoying. – Daniel Lip Nov 3 '17 at 1:52
• @DanielLip if this solved your problem, it's best to post it as an Answer and mark it Accepted. This makes it easier for other developers experiencing the same issue to find your solution. – DMGregory Nov 3 '17 at 2:44
• Why does this even happen? Yesterday I had no problems at all, and now everything is messed up and any new or moved file get miscellaneous – Black Nov 7 '17 at 11:58

All you have to do is click on the assets folder in your solution explorer and click on the refresh button.

• Worked like a charm. Wonder why there isn't a fix though – Tosh Nov 29 '18 at 5:34

I get this all the time. Right-clicking on the project in solution explorer and selecting Unload project and then Reload project works for me

This is currently a general bug on pending release. Please have look at this : https://developercommunity.visualstudio.com/content/problem/130597/unity-intellisense-not-working-after-creating-new-1.html

For some poeple unloading and loading project is not working. For me, currently I'm creating my scripts inside Visual Studio via Unity Project Explorer window( View - Unity Project Explorer) which sees the script as a part of the solution.

When you modify a project with an external tool (explorer or unity or whatever) vs needs to reload the project. Sometimes unity doesn't trigger the automatic reload process and you either have to restart vs and unity or reload the project in vs manually.

• How to manually reload the project in VS? – Black Nov 8 '17 at 12:56
• In solution explorer, right click on the project -> Unload, then right click on the same project -> reload – Alakanu Nov 8 '17 at 14:06
• @user1662292 already wrote that in a answer, you might as well choose his if it works – Alakanu Nov 8 '17 at 14:07

I solved it with this steps: Go to the file inside Solution Explorer. Right-Click file and select Exclude from project. Right-Click your project/folder where the file was and click add Existing Item, and add the file you just removed back into your project.

None of the above worked for me. What did work for me was to Add a new dummy class to the folder (example: "DeleteMe"). Then try to reference that new dummy class somewhere.

When I did this, Intellisense actually saw this dummy class (when it wasn't seeing any of my existing classes). After this, I was able to access the original class I was trying to reference. Just make sure you delete the dummy class you created.

What fixed it for me was looking in the Unity Package Manager, where I saw that my VS version wasn't up to date. When I updated, the problem went away.