Top ASP.NET Items

Sponsors

The Aspnet Compiler Build Task in Visual Studio 2010 ASP.Net MVC 2 Projects

If you crack open the project file in an ASP.Net MVC 2 application (in notepad or unload your project and then click “ Edit *.proj” ), you will notice an interesting line. <MvcBuildViews>false</MvcBuildViews> This is an option to enable a post build task that will run the Asp_net compiler. This command will compile your aspx pages and report any errors in the pages at design time. Ordinarily the compiler runs before your site loads for the first time after making a change. This is why you can debug a website or web application with errors in the markup and not see an error until actually running your site. So why is the option set to false by default? I obviously want errors at design time before I run the site! Well, if you turn Read More...

Read the complete post at http://blogs.msdn.com/webdevtools/archive/2010/05/14/the-aspnet-compiler-build-task-in-visual-studio-2010-asp-net-mvc-2-projects.aspx