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

后端 未结 26 1785
闹比i
闹比i 2020-11-29 18:42

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

相关标签:
26条回答
  • 2020-11-29 19:13

    Tools > Options > Text Editor > C# > General

    Make sure that "Auto List Members" is checked

    0 讨论(0)
  • 2020-11-29 19:15

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

    0 讨论(0)
  • 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>
    
    0 讨论(0)
  • 2020-11-29 19:17

    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.

    0 讨论(0)
  • 2020-11-29 19:17

    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.

    0 讨论(0)
  • 2020-11-29 19:18

    ... 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.

    0 讨论(0)
提交回复
热议问题