How to compile all cshtml files into a DLL or .net assembly in vNext?

I am using ASP.NET 5 (vNext) with MVC, is there any solution to publish all views in a separate DLL?

+5
source share
1 answer

The site below provides instructions for compiling Razor views in MVC 3. I'm not sure if this method will work for vNext.

This is a useful mechanism for creating common presentation elements on websites.

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

It can also help: Separate razor types by project.

This gitHub project is the final version of the previous one: https://github.com/RazorGenerator/RazorGenerator

0
source

Source: https://habr.com/ru/post/1244212/


All Articles