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.

Web Security for Sitefinity Administrators

The free standalone Web Security lesson teaches administrators how to protect your websites and Sitefinity instance from external threats. Learn to 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.

Was this article helpful?