How to Get Compile-Time View Errors in ASP.NET

One of the best things about compiled language over scripting is that you can get compile-time checks and prevent run-time errors later. By default, ASP.NET MVC uses a hybrid approach. The views are compiled at run-time but controllers, models, and other classes are pre-compiled. You can create strongly-typed views but since those views aren’t compiled at run time, you don’t always get warned about the changes to your models or other errors.

There is a simple way to change this. You need to see the views to built at compile time.

Read the rest of the post here:

Leave a Reply

Your email address will not be published. Required fields are marked *