The following worked for me with Visual Studio Professional 2012, ASP.NET MVC 5, and Microsoft.System.Web.WebPages 3.0 :
<add key="webpages:Version" value="3.0.0.0" />
But this solution did not work right away
First, Chris Haddox’s decision regarding webpages:Version :
<add key="webpages:Version" value="1.0.0.0"/>
did not work for me, I already had this key, and it was set to 1.0.0.0.
But since I am using Visual Studio Professional 2012, ASP.NET MVC 5 and Microsoft.System.Web.WebPages 3.0 ...
This problem showed that my Web.Config webpages:Version was set to 1.0.0.0 , I changed it to 3.0.0.0 because I read in another article, which may be correct for Microsoft.System.Web.WebPages 3.0 and I’m all there was still a formatting error for a while.
I continued to make changes to my .cshtml file. Then all of the sudden formatting started working correctly. Maybe from a building, but I don’t think I did the assembly, but I can’t be sure, and I know that I did not restart Visual Studio 2012.
Brian ogden
source share