Search code examples
asp.net-mvc-3razordisplay-templates

Creating an MVC 3 Razor - Display Template Library for sharing across multiple projects/solutions


Is it possible to put Display Templates in a separate VS project that can then be referenced by my web site projects. I like using display templates but I don't like the idea of re-use via copy and paste as this soon becomes a headache.


Solution

  • You may take a look at the following blog post which illustrates a technique allowing you to embed Razor views into separate assemblies and reusing them.