5
shouts

ASP.NET MVC: Pre-compiling views when using SafeEncodingCSharpCodeProvider - Mark Needham

published 356 days, 13 hours, 10 minutes ago posted by beebee 357 days, 13 hours, 2 minutes ago
Thursday, March 26, 2009 2:12:02 PM GMT Wednesday, March 25, 2009 2:20:00 PM GMT

We've been doing some work to get our views in ASP.NET MVC to be pre-compiled which allows us to see any errors in them at compilation rather than at run time.

It's relatively simple to do. You just need to add the following code into your .csproj file anywhere below the element:

where VirtualPath refers to the virtual path defined inside your project file and PhysicalPath is the path to the folder which contains the project with the views in.

As I previously mentioned we're using Steve Sanderson's...

category: ASP.NET | clicked: 0 | | source: www.markhneedham.com | show counter code
tags: ASP.NET, ASP.NET MVC, ASPNETMVC

No comments yet, be the first one to post comment.

To post your comment please login or signup