Razor intellisense not working in VS 2015

后端 未结 14 1342
南笙
南笙 2020-12-03 05:07

When I load up my VS2013 projects in 2015, all my razor views are filled with red squiggly underlines.

@model, @Scripts @url, @Html.Partial, lambda expressions

相关标签:
14条回答
  • 2020-12-03 05:33

    This could fix similar problems (I got it from somewhere, unfortunately I cannot remember, on Github)

    • Close VS Studio
    • Run command prompt as Administrator
    • In command prompt:
      > cd "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\Common7\IDE"
      > devenv /updateconfiguration
      > devenv /clearcache
      
      I hope the above will be helpful to someone.
    0 讨论(0)
  • 2020-12-03 05:35

    You dont need to reset the entire configurations of your Visual Studio using the devenv.exe /ResetUserData to workaround this

    Instead of it, try to just delete the contents of this directory with Visual Studio closed then reopen it: %LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache

    0 讨论(0)
  • 2020-12-03 05:37

    Just do one thing and go to:

    Tools > Extension & Update > Update Your Visual Studio Version

    It take some time but after that working fine.

    0 讨论(0)
  • 2020-12-03 05:43

    Just Put a Break point on the First line

    of Page. and remove it after few seconds... it will definitely work...

    0 讨论(0)
  • 2020-12-03 05:44

    Had the same issue. ResetUserData didn't work, etc. What ResetUserData did do though was reset some of the dialogs that were suppressed. Ultimately a dialog popped up stating "The 'CompatiblityCheckerPackage' did not load correctly." It told me to go to my users folder (path below) and check out the ActivityLog.xml. Turns out WebEssentials 2015 did not install correctly and was failing to load. I installed WebEssentials again and the Intellisense errors went away.

    Full Path for me:

    C:\Users\xxx\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml

    Hope this helps.

    0 讨论(0)
  • 2020-12-03 05:44

    i have read a lot of solutions, a i have lose much time, and when i was sure to not resolve the problem of visual studio 2015 intellisense, eureka, some one was giving the right solution: lean & clear 2 lines of code those I run in cmd (like administrator):

    1. C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE>devenv /updateco nfiguration
    2. C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE>devenv /clearcac he

    whe restart visual studio maybe it ask to reinstall one tools that was broked. Well you do but still fron now your intellisense is going work agane. good luck at all and much thanks at Nadir

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