24

I am opening files from a server ASP.net and the VB codebehind files, and my visual studio is not working correctly, Intellisense is dead and if i right click the "Go to defenition" option is disabled. These files are not part of a solution.

This is strange though because it was working properly yesterday. If I create a new project the intellisense works great, yet opening this single file it fails.

I have tried to re enable intellisense by resetting visual studio, I tried editing the text editor settings so that Auto list members and Parameter information are both checked. I even tried installing ReSharper and nothing worked. I have rebooted twice and even tried copying the file to a local drive to work on yet nothing.

Does anyone know why this is happening and what I could do to solve the problem? Im working on a rather complex problem and intellisense would make it a lot easier.

0

16 Answers 16

38

I managed to fix this problem which manifested itself after my ReSharper trial expired.

Steps to fix are:

  • Tools/Import and Export Settings
  • Reset all settings
  • Back up your config
  • Select your environment settings and finish

Intellisense started working again straight away.

3
  • 3
    Had exactly the same issue after taking resharper off. This totally worked for me. Thanks Sep 20, 2012 at 12:55
  • 1
    Same issue for me. Seems like Resharper turns off native VS tools after its trial so it can get people to think they're missing more than what they actually had.
    – paz
    Aug 12, 2013 at 15:53
  • Didn't work for me, but my problem is slightly different : there is only one aspx page from my project for which tags aren't closed automatically and intellisense works partially. Indentation is not working either.
    – Ishikawa
    Jul 6, 2021 at 10:29
8

For me simply hitting Ctrl+Alt+Space to re-enable Autocompletion fixed it.

0
6

I had the same problem. It only affected one of my solutions. Others seemed fine. To correct it I deleted the solution's user options file (.suo).

When I opened the solution again, intellisense was working.

3
  • I tried the other answers first, (except for the one about MSDN. :-)) This is the only answer that worked for me. I gave it an up-tick. I do not know why it was at -2. Sep 8, 2012 at 5:42
  • This happened to me once on a single solution and this worked for me. It happened again later on but it was across all solutions so I had to use "devenv /resetuserdata" but that threw out all of my custom settings so it should be a last resort. Jun 13, 2013 at 18:42
  • Worked for me too - although I also had to resave my solution (.sln) file. Thanks (and +1)! Jul 5, 2013 at 10:03
1

For the benefit of searchers, Nicks suggestion is good, but if you don't want to reset all your settings, you could follow the recommendation in this post.

It states - "go to "Tools | Options | Text Editor | C# | General and check the "Auto list members" and "Parameter information" checkboxes"

1

I should first note that upgrading my RAM from 4 to 16GB seems to have made this issue go away.

Here's the steps I go through:

If only one file/window appears to be affected, close/reopen that file. If that doesn't work, try below.

In Visual Studio:

  1. Click Tools->Options->Text Editor->All Languages->General
  2. Uncheck "Auto list members"
  3. Uncheck "Parameter information"
  4. Check "Auto list members" (yes, the one you just unchecked)
  5. Check "Parameter information" (again, the one you just unchecked)
  6. Click OK

If this doesn't work, here's a few more steps to try:

  1. Close all VS documents and reopen
  2. If still not working, close/reopen solution
  3. If still not working, restart VS.

For C++ projects:
MSDN has a few things to try: MSDN suggestions

The corrupt .ncb file seems a likely culprit.

From MSDN:

  1. Close the solution.
  2. Delete the .ncb file.
  3. Reopen the solution. (This creates a new .ncb file.)
0

Sometimes, it could be because of different extension style that you are using for the files.
In my case Intellisense is working in all the files except for a file in a different project of the same solution.
When I have changed the extension of the file to cxx from cpp,it started working.
The includes and other files in the solution are of extension .cxx or .txx.

Thank you

0

Save your solution. Closing the VS2010 instance for this solution and re-oprning worked for me. Here I assume that Intellisense was working OK but stopped for some unknown reason without changing any default settings.

Prabhdeep

0

After uninstalling ReSharper, the squigglies that show up underneath a syntax error stopped showing up in the code editor.

This blog post helped me fix the issue.

0

Try this:

Close any open instances of visual studio, delete the folder 10.0 inside `C:\Users[username]\AppData\Roaming\Microsoft\VisualStudio\' and restart the visual studio. Issue will be fixed.

0

In my case, none of the above worked (although I discovered that sometimes the *.suo file is the trouble maker - in those cases deleting it helps).

I fixed it successfully the following way: Let's assume your solution has the name MySolution. Do the following:

  1. Reset the settings (as described here). Close Visual Studio 2012.
  2. Locate the file MySolution.sln.DotSettings (it is in the same folder as your MySolution.sln file)
  3. Rename or delete it (for example rename it to XMySolution.sln.DotSettingsX so VS won't read it)
  4. Open your solution by double-clicking on the MySolution.sln file

And afterwards Intellisense was working again just fine. I assume the file MySolution.sln.DotSettings got corrupted.

Note: The file MySolution.sln.DotSettings was created and checked in to TFS by a team colleague who had installed ReSharper. The issue occurred on a different PC without ReSharper where the same project was opened.

0

For me, this was related to an incorrect xaml file build action in an Azure WorkerRole project (bizarre, though it may seem!). Please see my entry in this post if you want to know more:

C# VS2010 Entering break mode failed

The fix for the error in the above thread also resulted in the intellisense starting to work again.

0

I fixed this problem by removing Sybase Power Designer VS extension. You can try to disable other extensions.

0

Exactly the same issue, though would appear only on certain projects (even within a single solution).

Removing the *.*proj.user file (e.g. *.csproj.user) for the projects in question properly reset the missing features ("Go To Definition", "Organize Usings", Intellisense on certain types, etc).

In our case, I suspect this happens sometimes when we switch branches with an SCM that uses a single working directory (like git). If setup properly, it wouldn't track *.user* files but that means that if there are incompatible changes in it across different branches, you need to regenerate it.

So of course the "sometimes" would depend on the current branch and the next branch.

Unfortunately I don't see a very good solution if that's the case. Sometimes you really want to keep the user settings across branches if they're compatible, sometimes you want to regenerate them unconditionally. Ideally, you might even want to only change parts of them when switching, while keeping other parts.

If you never need to keep them and are fine with regenerating them every time, then you can configure your SCM to always remove these files while switching branches (e.g. using hooks for git). This is a pretty naive solution however, doing it more universally correctly would require a smarter system (aware of the semantics behind the .user files and capable of capturing/prompting user intent when needed).

0

save, close and reopen the source file you are working on. This works every time for me.

-2

Try to add the statement:

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="IP_Updater.Default" %>

...at beginning of your page. The above example is applied for page Default.aspx written in VB.NET.

-5

This is the problem related to Microsoft MSDN , your MSDN might be getting some problem. The solutions to this is uninstall MSDN and then re-install . before going for this make sure that you system is free from virus attack. Hope that after doing , the Microsoft Intellisense will start running

1
  • But wouldnt this affect everything I open? If I open the same files by doing file>open>website i have intellisense but opening the same files one by one fails Dec 15, 2011 at 11:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.