Visual Studio 2013 IntelliSense stops working for ASP.NET MVC5 Controllers

Visual Studio-2013Intellisenseasp.net Mvc-5

Visual Studio-2013 Problem Overview


I am facing a weird problem in my Visual Studio 2013 ASP.NET MVC 5 project. All of a sudden, the IntelliSense in the Controller classes of the MVC 5 project are not working at all.

I have other class library projects in my solution and IntelliSense is working in those class library project files, but the problem is only within the MVC project. Usually these kinds of problems are solved by restarting Visual Studio: not only did I restart Visual Studio, but I also restarted my computer, and the IntelliSense problem is not getting fixed at all.

Are there any other steps that can get me IntelliSense back?

Visual Studio-2013 Solutions


Solution 1 - Visual Studio-2013

Close Visual Studio. Delete the <ProjectName>.v12.suo file. Reopen solution.

Solution 2 - Visual Studio-2013

Resetting my settings or importing previously exported, working settings, and restarting Visual Studio worked: Tools > Import and Export Settings... > Reset all settings.

EDIT: This keeps happening to me, surprisingly often in VS Express, and occasionally in VS Professional. One thing I noticed in Pro, is that it has happened after unexpected shut downs (when IT forces a reboot in the middle of the night). So it may be related to Visual Studio not closing correctly. The technique described above has worked every time.

Solution 3 - Visual Studio-2013

Tools > Options > Text Editor > C# > General

Make sure that "Auto List Members" is checked

Solution 4 - Visual Studio-2013

I have found one way to solve the problem. That is,

  1. -> Remove the ASP.NET MVC Project from Solution,
  2. -> Then, add the MVC Project back to the Solution.

By doing these steps, I can get the Intellisense again. But, I am not happy with this solution though, because, next time when I double click the Solution file to open the solution, I see the intellisense is not working again. I would like to know the real reason why it is behaving like that.

EDIT:

Finally, I figured out that it was a 3rd party visual studio extension which was causing the problem. In order to find out that extension, I removed all extensions and then, added the extensions one by one and stopped where I found the culprit extension that was taking my sleep away :).

Solution 5 - Visual Studio-2013

You can unload project and reload the MVC project from solution

  1. Right Click on MVC project in solution explorer -> "Unload Project"
  2. Right Click on MVC project in solution explorer -> "Reload Project"

After this the Intellesense rework quickly.

Solution 6 - Visual Studio-2013

  • Tools -> Options
  • Text Editor -> C# -> Intellisense
  • Ensure "Show completion list after a character is typed" is checked

https://stackoverflow.com/questions/19438355/vs2013-intellisense-code-completion

Solution 7 - Visual Studio-2013

I'm not sure why it occurs, but when it happens to me I can recover Intellisense by simply restarting Visual Studio.

You're right, it's really annoying.

Solution 8 - Visual Studio-2013

Sometimes RESET of VS settings can help:

TOOLS->Import and Export Settings Wizard->Reset all settings->checkbox "No, just reset settings, overwriting my current settings"->Next>Next>Next

I had messed them with RESHARPER, and this helped.

Solution 9 - Visual Studio-2013

I found that the best way to fix IntelliSense issues is to simply unload the project in the solution explorer and load the project again. After that IntelliSense is always working for me and I do not loose bookmarks, breakpoints or any other settings.

Solution 10 - Visual Studio-2013

I have found that if the build fails then the Intellisense seems to break. After fixing my build errors and rebuilding the project the Intellisense will work after reloading the particular Razor file.

Solution 11 - Visual Studio-2013

In my case, restart didn't work.

So I did the following weird steps :

  1. Closed the solution
  2. Opened another solution
  3. Verified that intellisense worked in this other solution.
  4. Closed the other solution
  5. Finally, reopened the first solution.

And the intellisense worked again.

Solution 12 - Visual Studio-2013

Usually this happens when the buffers have an error in them. Most of the time the local cache error is cleared when you close a, windows form, for example and reopen therefore reloading it into memory. Many of the solutions above work but sometimes it as as simple as closing the item and designer and reopening the item.

Additionally you can try to force a reset by

Ctrl+K, Ctrl+I shows quick info Ctrl+Shift+Space shows you param info

Solution 13 - Visual Studio-2013

I tried lots of things which didn't work. In the end, I cut code to clipboard, recreated the controller and pasted code in. Problem solved!

Solution 14 - Visual Studio-2013

I too have the same issue with Intellisense in my Text editor.

> i just close example.cs file which is not providing Intellisense > and reopen that class without restart Visual Studio it > works for me.

Note : i don't have the same issue with all the .CS file in Solution Explorer

Solution 15 - Visual Studio-2013

I use VS 2013 and I had the same problem. My solution was update VS to last version. I my case Update 4. Simply reference in project must match with assembly in GAC on computer (OS). Intellisense come from VS not from project.

I hope that will handy for some one.

Solution 16 - Visual Studio-2013

... Yet another answer - but this was the cause of my pain: I'd installed Developer Assistant which had been working nicely but suddenly stopped providing suggestions. To get it working again:

options -> developer assistant -> Intellisense -> Default Visual Studio Intellisense

Took me 5 hours to find that :(

HTH.

Solution 17 - Visual Studio-2013

Tools->Options->Text Editor->C# (or All Languages)->General

check the check box for enable Auto List Members and Parameter Information in right hand side pane.

If its not selected,select it.

Solution 18 - Visual Studio-2013

Save everything and restart Visual Studio!

Solution 19 - Visual Studio-2013

I get this exact same thing every time I work with one particular MVC5 project. Restarting VS2013 does not work. Deleting suo files does not work. Resetting all tools settings does not work. The only thing that ever works is removing the project from the solution and adding it again. Seeing as I have to do this every day is is really quite annoying. Especially when I have it set to reopen the last files I had open, I then need to track down the ones I was working on and re-open them instead of the popping up automagically..

Solution 20 - Visual Studio-2013

I'm using VS 2013 with MVC 5. The solution for me was to add the following to Web.config:

<compilation debug="true" targetFramework="4.5.1">
  <assemblies>
    <add assembly="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add assembly="System.Web.Optimization, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add assembly="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
  </assemblies>
</compilation>

Solution 21 - Visual Studio-2013

Rushonerok's solution works great for me.
For anyone who doesn't know: <ProjectName>.v12.suo is a hidden file in project root folder. You must set on "Show hidden files" in your file browser to see it.

Solution 22 - Visual Studio-2013

So far some these solutions have not worked for me.

I have the following Workaround

Simply declare the type you want to use explicitly in a new variable and use that instead of Model.

@model MyModel
MyModel mymodel = Model;

@mymodel.MyIntelisenseIsWorkingAgain

Solution 23 - Visual Studio-2013

To solve this I closed Visual Studio Express 2013 and I reopened the Solution but double clicking on its .sln file directly from the file system. Opening it from the Start Page had my controllers intellisense broken.

Solution 24 - Visual Studio-2013

Closing and opening the Visual Studio Solution worked for me.

Solution 25 - Visual Studio-2013

Sometimes you close it by mistake. Try ctrl+space for windows or cmd+space for mac to turn it on.

Solution 26 - Visual Studio-2013

I know I'm a bit late, but adding this to my App.config file did the trick!

<system.web>
    <compilation>
        <assemblies>
            <add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        </assemblies>
    </compilation>
</system.web>

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionEmran HussainView Question on Stackoverflow
Solution 1 - Visual Studio-2013Rush FrisbyView Answer on Stackoverflow
Solution 2 - Visual Studio-2013Jeremy CookView Answer on Stackoverflow
Solution 3 - Visual Studio-2013philView Answer on Stackoverflow
Solution 4 - Visual Studio-2013Emran HussainView Answer on Stackoverflow
Solution 5 - Visual Studio-2013ArDumezView Answer on Stackoverflow
Solution 6 - Visual Studio-2013Sherif HamdyView Answer on Stackoverflow
Solution 7 - Visual Studio-2013JWilsonView Answer on Stackoverflow
Solution 8 - Visual Studio-2013d.popovView Answer on Stackoverflow
Solution 9 - Visual Studio-2013AndreasView Answer on Stackoverflow
Solution 10 - Visual Studio-2013Matthew WillView Answer on Stackoverflow
Solution 11 - Visual Studio-2013Guilherme de Jesus SantosView Answer on Stackoverflow
Solution 12 - Visual Studio-2013Mark AliczView Answer on Stackoverflow
Solution 13 - Visual Studio-2013Andy BrownView Answer on Stackoverflow
Solution 14 - Visual Studio-2013Midhun MundayadanView Answer on Stackoverflow
Solution 15 - Visual Studio-2013Piotr KnutView Answer on Stackoverflow
Solution 16 - Visual Studio-2013smingView Answer on Stackoverflow
Solution 17 - Visual Studio-2013thejustvView Answer on Stackoverflow
Solution 18 - Visual Studio-2013ChrisView Answer on Stackoverflow
Solution 19 - Visual Studio-2013PyrobriView Answer on Stackoverflow
Solution 20 - Visual Studio-2013StevenView Answer on Stackoverflow
Solution 21 - Visual Studio-2013PetrView Answer on Stackoverflow
Solution 22 - Visual Studio-2013ValamasView Answer on Stackoverflow
Solution 23 - Visual Studio-2013CoderRollerView Answer on Stackoverflow
Solution 24 - Visual Studio-2013UnbreakableView Answer on Stackoverflow
Solution 25 - Visual Studio-2013mcnkView Answer on Stackoverflow
Solution 26 - Visual Studio-2013Human_AfterAllView Answer on Stackoverflow