简体   繁体   English

如何在vNext中将所有cshtml文件编译成DLL或.net程序集?

[英]How to compile all cshtml files into an DLL or .net assembly in vNext?

我正在使用ASP.NET 5(vNext)与MVC,有没有任何解决方案将所有视图发布到一个单独的DLL?

The site below contains instructions for compiling Razor views in MVC 3. I am not sure if the technique will work for vNext. 下面的网站包含在MVC 3中编译Razor视图的说明。我不确定该技术是否适用于vNext。

This is a useful mechanism for creating shared view elements across web sites. 这是跨网站创建共享视图元素的有用机制。

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

This may also help: Sharing Razor views across projects 这也可能有所帮助: 在项目中共享Razor视图

This gitHub project is the ultimate version of the preceding: https://github.com/RazorGenerator/RazorGenerator 这个gitHub项目是前面的最终版本: https//github.com/RazorGenerator/RazorGenerator

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM