Click here to Skip to main content
15,891,712 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am using visual studio 2012 (Premium). I have a project that is using MVC. I am not able to add any breakpoint to the view(s) and thus unable to debug the variables at view side.
Moreover, Intelisens is also not working at views.

What I have tried:

I tried resetting the user setting devenv.exe/resetusersetting.
Tried clear the cache using below command:
C:\Users\pgoel\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache


I also tried many other things I came cross while looking for the solution but nothing works. Please help me out to get it fixed.
Posted
Updated 19-Jul-17 22:47pm

1 solution

After spending a lot of time looking for solution, I come across that for MVC projects, the version of MVC I am using should be installed in the environment. Although if I have added the dll but not installed in environment, the project will work but intellisense won't work.

<dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
        <bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
      </dependentAssembly>


Here is the fix. Go to web.config. See the version of MVC you are using and run the following Nuget command to install it.
PM > Install-Package Microsoft.AspNet.Mvc -Version 5.2.3

Version should be the same as mentioned in you web.config or MVC dll you are using.

See link for more information [^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900