Notes on Building Razor Views
Posted by: K. Scott Allen,
on 16 Feb 2011 |
View original | Bookmarked: 0 time(s)
Just like web form views, razor views dont build when you build an MVC project in Visual Studio. By default, the parsing and compilation of a view doesnt happen until runtime, meaning you might not know about a syntax error in a view until you hit the application with a web browser. Since its first release, ASP.NET MVC has provided the ability to parse and compile views at build time by manipulating the underlying MSBuild (.csproj) file. The option works for both web forms (.aspx) and Razor (.cshtml)...