SimplCommerce icon indicating copy to clipboard operation
SimplCommerce copied to clipboard

Why set `MvcRazorCompileOnPublish` to false? Shouldn't it be true

Open nj-sketch opened this issue 9 years ago • 3 comments

<MvcRazorCompileOnPublish> It was supposed to be true by default true in 2.0. But why is it set to false? And why setting it true gives an error on publishing the project.

nj-sketch avatar Oct 26 '17 07:10 nj-sketch

Because the WebHost doesn't add reference to module projects and we are dynamic loading the modules at runtime. So the dependencies are not ready at the build time.

Compiling view at runtime is need for dynamic theming.

thiennn avatar Oct 26 '17 07:10 thiennn

If the cshtml's were copied over via an msbuild target instead of gulp and included as Content items during a pre-publish/pre-precompile step, it could theoretically work but would go against the intention of changing things dynamically at runtime..

dasMulli avatar Oct 26 '17 07:10 dasMulli

:)

thiennn avatar Oct 31 '17 13:10 thiennn