After installing and then repairing my VS2015 instance I still cannot get intellisense (server side) to work in my MVC views. I get alerted by message promp
Might have happened due to having ReSharper.
It will be fixed in future versions, but as of now (version 10.0.2), it is broken. ReSharper overrides the IntelliSense of Visual Studio and therefore it will not work, which also explains why running devenv.exe /ResetUserData
fixes it since it removes ReSharper.
Manually return the IntelliSense power to VS through the menu:
ReSharper
>> Enviroment
>> IntelliSense
>> Fill the following:
And this is how the IntelliSense from VS should look:
This has been recurring for me also and seems to be connected to extension updates but I have not yet been able to blame anything specific. What I have been able to discover is a less intrusive resolution.
In my case deleting the contents of this directory allows the IDE to recover:
%LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache
Edit: I just came across this one which might be handy too - Clear MEF Component Cache (Open VSIX Gallery)
There is another solution, without reset all user data
(but only window layouts/toolbars):
close all VS2015 instances, [eventually backup, and] delete the folder:
"[User Directory]\AppData\Roaming\Microsoft\Visual Studio\14.0"
Now, re-open VS2015: layout was reset to factory preset, but Razor syntax would work
This might sound funny but just to do one thing..
Put Breakpoint on any line and then wait for 5 seconds of that do not work then go to first line and put break point there and as you put break point it will ask for break point settings. click on that settings and close that settings. Done. you intellisense is now working.
I have VS 2015 Community edition.Previously had VS 2015 Enterprise and it happened on that but after getting community i found that same happens and same solution work for both.
I found that solution by accidently during work.Also do that when project is not running.and you can remove that break point also.
The /ResetUserData
solution is your best bet, but I also think I have found out a possible cause of this...
I am currently using Umbraco to create Macro Partials in the BackOffice. When these files get created I click on the Hide/Show all files button to show the Macro Partial in my solution and the Razor Syntax Highlighting seems to stop working so my guess is new files introduced into your solution that aren't created directly through VS cause this issue.
Even when adding the files to the solution the Syntax Highlighting doesn't work.
Mine was a slight pain in the keester but seemed to work. In my case it was a .aspx File that wouldn't do intellisense anymore (after I stupidly changed the .aspx filename...lesson learned!)
Round about way but not as bad as uninstalling/vs reinstalling which is TOTALLY overkill. Good luck everyone! Hopefully MS will get this fixed one of these years!