MVC / Razor - Intellisense Pop-Up closes when the next parenthesis is present

When writing code in Razor, the intellisense popup does not work correctly. It will open and then close in less than a second.

This does not happen to me when I write a class or something like that, it is present only when I am working on a view.

To explain what happens when I print

  • @Html.
    • The Intellisense field opens and remains open.
  • @ Html.DisplayFor (p => M) // The closing bracket is automatically written VS
    • A window opens displaying possible inputs starting with M, but closes immediately.
  • @ Html.DisplayFor (p => Model.)
    • A window opens and shows the properties associated with the model, but then closes immediately.

If, however, I add a space:

  • @ Html.DisplayFor (p => M)
    • The box remains open.
  • @ Html.DisplayFor (p => Model.)
    • The box remains open.

Is there a tweak or something that does this to me?

This problem persists after closing and reopening VS, as well as for project recovery.

Using Visual Studio 2015 Professional 2015 Update 2 Working with Razor while running MVC. I also installed Web Essentials if there is a parameter in this that can cause this.

+7
asp.net-mvc visual-studio-2015 intellisense
source share
2 answers

In my particular case, I was able to solve the problem by installing the latest version of Microsoft ASP.NET and web tools.

https://marketplace.visualstudio.com/items?itemName=JacquesEloff.MicrosoftASPNETandWebTools-9689

As soon as I installed it, the problem disappeared. It is likely that this update fixes what could have been fixed using the old version, but in any case, I'm happy.

(I found this in Visual Studio under Tools-> Extensions and Updates ...-> Updates-> Visual Studio Gallery)

0
source share

I also have such an unpleasant problem (VS2015), I do not know rhyme or reason, but one example: At the top of the cshtml file I had ...

@{ Style. } 

When I clicked the "." after style, intellisense showed for a split second, then leaves.

I know this is stupid, but when I added a return key to add row space, I will get intellisense again.

 @{ Style. } 

I know this is not a fix, but this work will quickly make me come back again.

Remove all spaces after a style. before}, so it looks like Style.} also worked for me, so there may be some special character that causes problems.

0
source share

All Articles