Expand the precompiled Razor view and delete the Views folder?

I set MvcBuildViews to true and precompiled the views into a DLL file. My question is: can I deploy this DLL and completely delete the Views folder? Are there any settings that I will need to make?

Thanks.

+4
source share
1 answer

I believe (correct me if I'm wrong) MvcBuildViews just compiles your views, but you still need to distribute them.

The RazorGenerator project will be interesting to you and can behave exactly as you need.

http://razorgenerator.codeplex.com/

It says how it works. I used this before to create β€œplug-in” MVC applications where only the binary file is distributed, not the views.

http://blog.davidebbo.com/2011/06/precompile-your-mvc-views-using.html

+1
source

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


All Articles