Skip to content

Instantly share code, notes, and snippets.

@vtml
Created December 5, 2019 11:16
Show Gist options
  • Save vtml/d1410e5ca24d5dbbc62f854e6095c802 to your computer and use it in GitHub Desktop.
Save vtml/d1410e5ca24d5dbbc62f854e6095c802 to your computer and use it in GitHub Desktop.
LocalDeveloper Environment Based Configuration for Views Precompilation
<?xml version="1.0"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:localenv="http://www.sitecore.net/xmlconfig/localenv/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
<sitecore role:require="Standalone or ContentDelivery or ContentManagement">
<settings localenv:require="LocalDeveloper">
<!-- MVC: Flag for controlling whether Razor View Engine will look at physical view last modified dates
when determining to use a view file from a pre-compiled assembly or from the file system.
Default: "false"
-->
<setting name="Mvc.UsePhysicalViewsIfNewer" value="true" />
</settings>
<mvc>
<precompilation>
<assemblies>
<assemblyIdentity name="ACME.Website" />
</assemblies>
</precompilation>
</mvc>
</sitecore>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment