The requested page is not available for the requested platform. You are viewing the content for Default platform.

DevExpress Resource Management Mechanism

  • 3 min to read

This topic describes how DevExpress manages theme resources when a project is deployed.

The DevExpress resource management mechanism obtains a resource path (such as '~/App_Themes/BlackGlass/{0}/sprite.css') from a skin file deployed into the App_Themes' theme-specific subfolder (such as BlackGlass). After resolving this path based on our naming convention (placeholder {0} is converted into the correct suite identifier, such as ASPxEditors), the DevExpress resource manager tries to find the corresponding resource file within a list of all resources available for the current page. This list is built by the resource manager that traverses all DLLs loaded at runtime (including those contained within the project's Bin folder), and enumerates all resources contained within the DLLs.

Then, if the resource file is found in the built-in list of available resources, the resource manager initially tries to obtain that file from the corresponding DLL. This may fail if the required DLL was not loaded (or was dynamically unloaded) or if it has an incorrect DevExpress version (such as a major or minor version number that does not match).

If the resource manager fails to obtain the required resource file from a DLL, it then tries to find and load this file from the site's App_Themes folder using a site-relative path (such as [website-url]/App_Themes/BlackGlass/ASPxEditors/sprite.css).

The success of this operation depends on how theme files are deployed into the project's App_Themes folder - whether all theme files or only skin files are deployed. If only skin files are deployed (the ASPxThemeDeployer's 'Only skin files' option is checked), then the resource file (sprite.css) is not included in App_Themes, and cannot be loaded. As a result, DevExpress controls may not render properly.

Theme Deployment Troubleshooting

If you run into problems when applying a theme, take the following measures to identify and fix the issue:

  • Check to see if the ASPxThemes.dll assembly is included in the deployed project's Bin folder.
  • Check to see if the ASPxThemes.dll assembly's attributes (such as Version and PublicKeyToken) coincide with other referenced DevExpress assemblies.
  • Check to see if the DevExpress enableThemesAssembly option is set to true in the devExpress section of your web.config.
  • Try adding a reference to the ASPxThemes.dll into the assemblies section of your web.config, as shown in the code below:

    
    <add assembly="DevExpress.Web.ASPxThemes.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A" />
    

    It is not necessary to actually reference this assembly. However, this may help you identify incorrect assembly versioning, or it may initiate the forced loading of this assembly.