Why does intellisense and code suggestion stop working when Visual Studio is open?
P

32

170

I have been having issues with Intellisense in Microsoft Visual Studio 2012. I will be working in a project, editing code and whatnot (after a period of time, anywhere from 5 minutes to over an hour) and all of a sudden, no more code suggestions or intellisense. Both seem to stop working completely at the same time.

The only solution that I have tried is to reset all my settings, close out of Visual Studio completely and reopen the project again. Is there a better solution or an update that will fix this?

Prescriptive answered 21/12, 2012 at 0:13 Comment(12)
Please limit your tags to those that are actually necessary. "microsoft" is not, as no one else makes Visual Studio or has vb.net. "application-settings" would seem to be about saving/reading the settings for an application you're writing, not an IDE you're using. You might also want to edit your question and break it up into some readable paragraphs; the wall of text you posted is hard to read, and the easier you make your question to read the better your chances of getting help. :-)Brine
Sorry about that, it's just that I get so worked up when things that should be working just aren't for any reason.Prescriptive
Do you have any add-ons installed?Niobe
+1. I had the same problem several times in VS 2010. Restart of VS usually helps. There is no need to reset settings. It happens rarely, so never was a big deal for me.Venge
No add-ons are installed at this time.Prescriptive
I noticed this started happening to me after I removed ReSharper (I've never used VS without ReSharper before that).Vexatious
It seems one of the causes is if VS didn't expect code where you put it. For example, if you type "Dim obj As New Object = ", you can still get intellisense after the = if you hit Ctrl+Space but it won't come up automatically anymore.Olivenite
Just started using release of VS2015. Intellisense was working fine, then I came out of a debug session and it stopped. Even utilizing Tony L's answer did not work. I just closed and reopened VS, and it started working again.Photocurrent
just now I've had this problem while debugging an exception, VS opened the same file twice, for example Form1.vb. I was trying to edit the wrong one opened laterParathion
Having the same issue still in '17, in multiple different file typesValval
Restarting the Visual Studio fixed it for me.Yorker
Stupid cause but it had me searching for 10 minutes. The file was not included in the project due to an unexpected rebootHelio
I
11

I spent a lot of time researching the same problem. Some solutions related this bug with some referenced assemblies. Others said that Microsoft.Windows.Design.Extension.dll and .Interactivity.dll should be in the references of the project. But none of these solutions worked for me.

I think it is a bug in Visual Studio 2012, Microsoft has to fix it.

Infestation answered 21/12, 2012 at 8:40 Comment(10)
I have visual studio 2013 and this is still happening. Is this still a bug?Hypothec
Yes, it is. And unfortunately over the last couple of years VS has been getting slower and buggier with each iteration it seems.Metalloid
This should not be the accepted answer. Tony L's answer below is correct.Spotty
I have visual studio 2015 and intellisense is very slow or not working at all. Occasionally it works ok but usually not.Pinzler
Still getting this problem in VS2015Advisee
Sadly this has been happening even more frequently to me. VS2015 Update 3.Liquidator
Still getting this problem in VS2017Lickerish
It's still happening in VS 2019. Sucks to have to keep restarting to get a basic functionality to keep working.Woolworth
@Adrian: I think it's because this is a bug in VS. Everything else posted are suggestions that might temporarily resolve the bug...although I suspect it's the restarting of VS that's making those suggestions work.Woolworth
Thank you very much I have had a problem for a long time i added Microsoft.Windows.Design.Extensibility & Microsoft.Windows.Design.Interaction in vs2019 and workedKaplan
O
343

I should note that I haven't had the issue since upgrading my RAM. I can't confirm if it's related but the problem was prevalent when I had 2-4GB RAM. No problems since going to 8 and 16GB.

If only one file/window appears to be affected, close and 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 most likely.

From MSDN:

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

Notes:

  • Tested in VS 2013/2015

Logging possible causes:

  • Copy/pasting controls in a source page. I found that my designer.vb file didn't update from this, either.
  • Copy/pasting code from another page that caused an error because the code copied referred to a control that wasn't on the page I was pasting to.
  • C++ project has corrupt .ncb file

(Please add to comments if you notice behavior that causes this.)

Olivenite answered 16/1, 2015 at 19:36 Comment(22)
Had to just restart VSMcgriff
It just changed my theme to light. That's literally all it did. hahaHeracliteanism
@Heracliteanism What action changed your theme and what version of VS are you using?Olivenite
Resetting the options as described in this post, VS2012Heracliteanism
My intellisense is "flickering" now. It has never actually worked in a large project. Every once in a while, function names will be highlighted for a second, and then blend back to the color of the rest of the surrounding code.Heracliteanism
@Heracliteanism Was your theme dark before? The first screen you get when you go to tools->options has the theme dropdown. I wonder if the dropdown defaulted to light/blue instead of remembering what you had and it changed when you hit ok. I tried this in 2015 and wan't able to reproduce that behavior.Olivenite
@Heracliteanism Does intellisense work well is smaller projects for you? My guess is the flickering means that you intellisense is now turned back on but the large project may be creating a performance issue.Olivenite
Let us continue this discussion in chat.Heracliteanism
@Heracliteanism There's a few more things that can happen with C++ projects. I'll bet your .ncb file is corrupt. Try these msdn.microsoft.com/en-us/library/….Olivenite
For me, restarting VS did NOT have the effect that closing and opening that file had. Thanks a lot!Danit
The Tools-> bit works on VS2015 Ultimate Update 2 as well, without restart. If only I could give this answer+1^6, I was in 2 minds to move to Eclipse >;-) That said, someone at MS ought to be circumcised for the improductivity that this bug caused worldwideShimmer
Another silly cause for missing function argument Intellisense can be an inaccessible protection level. For example, a protected ctor instead of public. The protected ctor will appear in the function list outside of accessible scope, but the argument intellisense will be missing, which is somewhat inconsistent IMHO.Harvard
"close/reopen solution" worked for me. "Uncheck/check Auto list members" did not work.Beginning
I had to delete and re-add the affected file in addition to the instructions in this answer.Bunyan
Just remove .suo file.Spectrochemistry
What worked for me was the check/uncheck thing, closing all windows and restarting.Anaesthesiology
Check/Uncheck of General and C# did not work for me but reopening the file did work. Visual Studio Ultimate 2013 w/ Update 5.Lough
This should be accepted answer. Works in vs 2017 as well. This is such an " old ms" fix: - something doesn't work - do this few absurd things - ohh it works againTessellated
Uncheck/check AND close/reopen the solution worked for me. On their own they did not work, they both had to be done in my case.Salchunas
Steps 1-6 worked for me in VS 2017. I think it's caused by disabling resharper or if your resharper license expires. It doesn't set the VS defaults back. See this answer for more details: https://mcmap.net/q/145051/-visual-studio-c-intellisense-not-automatically-displayingDisorientate
@guko_da_master I didn't have resharper when it happened to me.Olivenite
None of this helped, even tried a reinstall. This was a clean install on a new Windows 11 install too.Neighboring
S
39

What works for me is removing the dynamically-built .suo file (Solution User Options), in the .vs (hidden) directory located at he same path as the solution file.

I have this problem sometimes coming back, and it's on different project's/solutions, but never VS wide. New Projects always work fine.

Running VS2015 Professional Update -2-

Seineetmarne answered 17/7, 2016 at 12:26 Comment(2)
This solution worked for me! Microsoft Visual Studio Professional 2015 Version 14.0.25431.01 Update 3. Thank you very much.Trahurn
do NOT follow this advice. all of my project's configurations are gone now (include directories, defines, etc.). VS2017Hemeralopia
C
15

I am having the same issue; Intellisense randomly will stop showing in some files, but not others. I just had it happen to me again. Hitting Ctrl + Space won't show anything in Form1, switching to Form2 or any other class will pop up the list as expected. Restarting Visual Studio usually does the trick, though it's highly annoying and ridiculous for such a basic feature to be broken...

Centroid answered 28/5, 2013 at 12:28 Comment(1)
I don't know why, but Ctrl + Space solved my problemSchuster
S
14

I found a solution that works for me 100% of the time (I do not have ReSharper installed). Pressing Refresh in Solution Explorer makes IntelliSense come back.

Subequatorial answered 22/12, 2017 at 8:12 Comment(1)
Works for me in VS2017, and I don't know if ReSharper is installed. (I think that covers all possible cases.)Chilton
I
11

I spent a lot of time researching the same problem. Some solutions related this bug with some referenced assemblies. Others said that Microsoft.Windows.Design.Extension.dll and .Interactivity.dll should be in the references of the project. But none of these solutions worked for me.

I think it is a bug in Visual Studio 2012, Microsoft has to fix it.

Infestation answered 21/12, 2012 at 8:40 Comment(10)
I have visual studio 2013 and this is still happening. Is this still a bug?Hypothec
Yes, it is. And unfortunately over the last couple of years VS has been getting slower and buggier with each iteration it seems.Metalloid
This should not be the accepted answer. Tony L's answer below is correct.Spotty
I have visual studio 2015 and intellisense is very slow or not working at all. Occasionally it works ok but usually not.Pinzler
Still getting this problem in VS2015Advisee
Sadly this has been happening even more frequently to me. VS2015 Update 3.Liquidator
Still getting this problem in VS2017Lickerish
It's still happening in VS 2019. Sucks to have to keep restarting to get a basic functionality to keep working.Woolworth
@Adrian: I think it's because this is a bug in VS. Everything else posted are suggestions that might temporarily resolve the bug...although I suspect it's the restarting of VS that's making those suggestions work.Woolworth
Thank you very much I have had a problem for a long time i added Microsoft.Windows.Design.Extensibility & Microsoft.Windows.Design.Interaction in vs2019 and workedKaplan
F
11

What worked for me is by disabling and then re-enabling the Resharper

Goto
Tools -> Options-> Resharper ->General

Click
Suspend -> This disables the resharper

Then check your Intellisense is working or not. In my case, it did and then I resumed the Resharper.

If this does not work, you might need to Goto
Resharper -> Options-> Environment -> Intellisense -> General

And
Change Intellisense to Visual Studio

Footstalk answered 6/7, 2017 at 2:9 Comment(0)
N
6

It didn't work for me with all those steps. Strangely enough I noticed Intellisense was working for another solution in visual studio 2015, but not for a specific one.

I located and deleted the .suo file and restarted visual studio. That fixed it for me.

Neckline answered 21/12, 2015 at 18:19 Comment(0)
S
2

I had the same problem on Visual Studio 2010 on C++ and I surpassed it by Tools -> Options -> Text Editor -> C/C++ -> Advanced -> Disable database -> False, Ok ; Close VS; open VS and voila.

Stasny answered 22/10, 2015 at 16:3 Comment(2)
Did you test it before restarting VS? I'm wondering if the restart alone fixed it.Olivenite
At first, I tested it once before VS restart and it didn't work, changed that option several times then restarted and after restart it had other behavior according to the last change; ergo I deduced the effects take place after VS restart.Stasny
B
2

I was facing this problem in Visual Studio 2015 + C#.

After a while, I solved this way:

1) To go: Tools -> Options -> Text Editor -> C#

2) Check these options "Auto list members" and "Enable virtual space".

Probably, some extensions, like R#, disable these options for use their tools.

Basically answered 13/5, 2016 at 12:30 Comment(0)
D
2

With visual studio > 2015 I deleted the .suo file. (search for it in your project through file explorer)

Restart visual studio and you're good to go.

Democratic answered 1/8, 2019 at 14:47 Comment(1)
I deleted the .vs folder within my Project to get it fixed on VS 2017 & 2019Renettarenew
Y
1

I am facing the same issue with Visual Studio 2015 Preview. I have closed that respective file and re-opened it. That fixes it for me :).

Yost answered 21/11, 2014 at 6:49 Comment(0)
C
1

In my case, I had added an .ascx.cs into the project via right-click => "Include in Project", but the project had it set as "Content" instead of "Compile". Once I set this to "Compile", intellisense began working again.

Chairmanship answered 13/9, 2016 at 15:37 Comment(0)
I
1

MS Visual Studio 2017 Pro, C++ projects

Too many good answers for this question. This worked for me:


IntelliSense works only when i load the project by double clicking the solution file.

I tried all the above answers with unfortunately no luck. Dll's, setting, dependencies...you name it. It sucks that you have to go through all that for an autocomplete....miss my Vim config....

Indite answered 31/7, 2018 at 20:18 Comment(0)
R
0

Try to install the update 1 package, link. I have had the same problem and solved when I installed the update.

Rodl answered 25/12, 2012 at 14:27 Comment(0)
D
0

I have VS2012 update 4 and the problem is intermittent, but once it strikes on that particular page being edited it is there to stay. One solution is simply to close the page and re-edit it.

Here's some KBD shortcuts to try to reboot it, but don't know if they work.

Visual Studio keyboard shortcut to display intellisense

None of those solutions worked for me, BTW I'm using C#...

I think this is another IS bug.... it's had lots of issues in the past.

Diverse answered 13/10, 2014 at 17:14 Comment(0)
S
0

@TonyL's answer didn't work for me, but I noticed Intellisense stopped working in the foo class after I changed the method signature in the bar class.

Closing and reopening the foo.cs file fixed it.

Struve answered 15/2, 2015 at 22:49 Comment(0)
S
0

One of the thing that just helped me is

  1. Deleting every project file that is out there. My project has 10 folder, 30+ files.
  2. Recreating the project.

This takes about 5 mins - but saves a lot of time as intellisense actually started working.

One thing to note was that the memory usage (right top corner of VS 2013 ultimate) shows about 40% drop.

Smug answered 28/2, 2015 at 1:35 Comment(1)
Small projects will be fine with this. I'm looking at an intellisenseless project with over 100,000 files right now though.Heracliteanism
R
0

I had the same issue, it turned out to be that nuget packages were not automatically downloaded for a solution i downloaded from the repository freshly, thus intellisense was not available since none of the required packages to show the right suggestions were available.

Resuscitate answered 25/8, 2015 at 13:20 Comment(0)
B
0

im currently watching a MVA python tutorial on youtube and noticed my intellisence had also disappeared, soon after they expalined why,

something along the lines of this (excuse my lack of proper coding vocabulary i am new to programming but i have found the solution)

Answer: " Visual studio can not always guess what you are trying to input - therefore it does not always realise that it needs to give you a hint, for example if you are trying to use a string within a variable and need intellisense to give you options for that strings content, you must sometime tell visual studio that this variable actually is a string.

example:

name = ' ' # insert this line to tell visual studio that your variable is a string.
name = input('whats your name? \n') 
name = name.upper() #then when you type name.u.... it will give you intellisense
Bolitho answered 1/12, 2015 at 2:14 Comment(0)
D
0

I had the issue in just one file. After creating the new class and working on it, it hadn't been added to the scope of my project. So when I closed and reopened my solution the following day, the file wasn't in the project scope.

Adding the existing item to the project scope fixed it for me.

Denominational answered 17/12, 2015 at 9:4 Comment(0)
S
0

In my case, I was simply unobservant at first and didn't see that one of the 30+ projects in my solution said "(load failed)" even though one of its files was still loaded in the editor, but had no intellisense. Reloading the project did the trick.

Simmons answered 4/1, 2016 at 21:34 Comment(0)
C
0

Intellisense did not recognized an imported namespace in my case, although I could compile the project successfully. The solution was to uncheck imported namespace on project references tab, save the project, check it again and save the project again.

Cardenas answered 3/2, 2016 at 10:22 Comment(0)
P
0

I had this problem when some of the dependent assemblies are changed but locked by an other instance of visual studio (2015).

Peeler answered 9/6, 2016 at 10:29 Comment(0)
A
0

My solutions (I was using perforce) is to load the entire solution instead of the individual file.

Originally I had loaded a file by click on it in perforce

Solution Close VS (which closed the individual file) Reopened by starting the solution file instead of the individual file

Asuncion answered 1/8, 2016 at 19:15 Comment(0)
M
0

If you are using Master Pages then create a blank master page use that master page in your content page. If this resolve the problem then it means your original master page have some problem. Port your original code step by step to new master page and test after each port if intellisense is working properly. This trick solved my intellisense problem.

Militate answered 13/10, 2016 at 15:11 Comment(0)
C
0

For python, try clicking on the "Python X.X" button on the left side of the bottom status bar and changing it to different values.

This is the only thing that worked for me.

Contention answered 14/1, 2018 at 17:27 Comment(0)
I
0

If anyone is still having this issue, simply close the solution and then reopen it.

Inactivate answered 8/6, 2018 at 23:35 Comment(0)
T
0

I've dealt with this for as long as Visual Studio existed. And yes, even in the current version it still fails (especially for large projects.)

I want to share small free tool that my friend and I wrote to address this exact same issue. You basically close your solution, drag its folder into the icon for this tool and it will reset all intermediary files for you. (Read the text manual inside if you want to know which ones. It's not just one file.)

I use it to clean up all my VS projects. So here you go:

enter image description here

Talion answered 13/8, 2018 at 8:22 Comment(0)
C
0

Visual Studio 2019

The only thing that worked for me: Go to Tools -> Options -> Text editor -> C# -> Intellisense

And turn off

enter image description here

Turns out I was too eager to try everything that's new in VS :) It was broken in only one solutions though.

Confirmation answered 24/7, 2020 at 8:10 Comment(1)
That did not work for me, i had to delete the '.vs' folder (at solution level, probably hidden). Now it seems to work again for me.Impropriety
P
0

The build + intellisense in the Error List quit working on my web project only. The fix that finally worked for me was removing the .csproj.user file. When I opened the solution Visual Studio recreated the file and it was all working as expected.

Then I deleted the new file and put my old one back and it was still fixed, so ¯\(ツ)

Pollux answered 31/7, 2020 at 15:56 Comment(0)
M
0

If you are using cmake, close the Visual Studio then delete the whole build folder and finally open it and rebuild everything. That works for me

Mischa answered 18/5, 2022 at 13:35 Comment(0)
D
0

Also consider the possibility that the code suggestions you're looking for come from a third-party library. I had problems getting code suggestions in one project (.csproj) but not another. It turned out I missed the NUnit.Analyzers package in that project.

Dasyure answered 23/2 at 13:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.