Tag Archives: ASP.NET Razor MVC .NET C# cshtml views model view controller Visual Studio

Compiling ASP.NET Razor cshtml helpers into a separate library / DLL

Good post about how to package up your MVC razor views into a shared .NET assembly that you can use in multiple projects.  In the past, I often had duplicated views / helpers in each project that was using ASP.NET MVC 3 w/Razor.  This was getting to be a maintenance headache, so I looked around and saw Chris Van De Steeg’s post about how to actually accomplish this.

http://www.chrisvandesteeg.nl/2010/11/22/embedding-pre-compiled-razor-views-in-your-dll/

Chris was inspired by David Ebb’s post, orignally: http://blogs.msdn.com/b/davidebb/archive/2010/10/27/turn-your-razor-helpers-into-reusable-libraries.aspx