Turn off precompilation of Razor views

When precompiling views, you benefit from faster loading times and better performance. However, you may want to disable the precompilation of Razor views if:

  • You are not publishing to Live environment or you want to disable precompilation for a folder.
  • After upgrade, your Visual Basic project is not built or an error is thrown during site initialization. That is, there are problems with the compilation of your Visual Basic project.

You can solve both issues, listed above, by turning off precompilation of Razor views in Sitefinity CMS:

  1. In Visual Studio, open the context menu of your Sitefinity CMS project and click Unload Project. Edit the project file of the web application, which, by default, is SitefinityWebApp.vbproj, or .csproj, respectively.
  2. Depending on whether you installed the Telerik.Sitefinity.Feather NuGet package, do one of the following:
    • If the package is installed, comment out the following import elements:
    • If the package is not installed, comment out the following import elements:
  3. Save and close the file.
  4. Open the context menu of Project and click Reload Project.
  5. Rebuild the solution.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Tags

Was this article helpful?