Last post Mar 23, 2016 07:02 AM by Chris Zhao
Mar 22, 2016 08:32 PM|keivan mousavi|LINK
I use razorgenerator in MVC
how apart from copy view.cshtml in assembly create view.cshtml in DLL???
Mar 23, 2016 07:02 AM|Chris Zhao|LINK
Hi keivan mousavi,
If you need to create a separate library for your precompiled MVC views, the best approach is to actually create an MVC project for that library, instead of a library project. You'll never actually run it as an Mvc app, but the fact that it comes with
the right set of config files allows intellisense and other things to work a lot better than in a library project.
You can then add a reference to that 'MVC View project' from your real MVC app.
And note that you need to install the 'RazorGenerator.Mvc' package into the library, not the main MVC app.
https://github.com/davidebbo/MvcApplicationRazorGeneratorSeparateLibrary for a sample.