Skip to main content
All docs
V22.1

'Cannot find the X theme' or 'Theme X cannot be found in the application or global theme directories' errors occur

These errors may occur in the following cases:

  • When you use different techniques (for example, Standard ASP.NET and DevExpress) to apply themes in the same application.

    Choose a theme technique to use in your application and do not mix it with other techniques. If you prefer to use the DevExpress theme mechanism, do the following to solve the issue:

    • Remove the “\App_Themes\Theme_name” folder.
    • Remove the theme declaration in the pages configuration section.
    • Remove the theme declaration from the Page directive.
    • Specify the theme name in the devExpress.themes configuration section in the web.config file:
    <devExpress>  
        <themes ... theme="THEME_NAME" />  
    </devExpress> 
    
  • When the application idle timeout expires.

    In this case, the server disposes all associated resources including a custom theme assembly.

    To solve the issue, check that you do not mix different theme techniques (see the point above) and register a custom theme assembly in the Application_Start event handler:

    Global.asax

    void Application_Start(object sender, EventArgs e) {  
        CUSTOM_THEME_ASSEMBLY_NAME.ThemesProviderEx.Register();  
    }