I'm using Visual Studio 2012 and I wrote some Razor scripts in *.cshtml. I'm not using MVC but "asp.net web page 2" (the term which is what Microsoft called it).
When I compile it and run the website, I ran into a razor syntax error on the website. Upon closer inspection I noticed Visual Studio see the syntax error w/ red underline but it is allowed to compile anyway.
So, is there a flag or something I need to turn on in Visual Studio to enforce the razor errors. Yes, I know it takes longer to compile but we do need it cuz we can't see everything at runtime and we missed some of the errors when it was deployed to production site.