Views can either be precompiled into HTML/CSHTML by the developer, or they can be compiled at runtime by the framework. Default implementation is to have them precompiled. If you want to have them compiled at runtime, follow the steps below
- Guarantee that the views (xvc files) to be compiled at runtime are set as embedded resources in the project
- Open web.config and look for the section "appSupportLibSettings"
Inside that section add the following markup:
The containerAssemblies property is optional. You can define it if you want to specify which assemblies contain the views (xvc files) to be compiled. The value of this attribute should be either the fullname of the assembly, or a partial name (eg: If you enter "CompanyName", the lookup will target all assemblies whose name starts with "CompanyName").
The containerPaths property is also optional. You can use it if you want to read files directly from the disk instead of reading them from assembly embedded resources. Usually, this is helpful for development environments where you wish to be able to edit views without forcing a recompilation of the entire assembly
Note that if both properties are specifyed, the lookup order is the following: paths -> assembly embedded resources.