[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Collapse]Common Concepts
  [Expand]Web.config Modifications
  [Expand]Callback Exception Handling
  [Expand]Client-Side Functionality
  [Expand]Cookies Support
  [Collapse]Appearance Customization - Theming
    DevExpress Themes Overview
    Available Themes
    ASPxThemes Assembly
    Modifying Themes
    Changing Theme Base Color and Font Settings
    ASPxThemeDeployer Tool
    ASPxThemeBuilder Tool
    Apply a Theme with the DevExpress Mechanism
    Apply a Theme with the ASP.NET Mechanism
    Attaching a Custom Theme Assembly
    DevExpress Resource Management Mechanism
   [Expand]Obsolete Approaches (prior to 2012.1)
   Icon Collection
  [Expand]Performance Optimization
  [Expand]CSS Image Sprites
   Data Annotation Attributes
   Supported Document Types
  [Expand]Accessibility Support
   Right to Left Support
   HTML Encoding
  [Expand]SharePoint Support
   Mobile Support
  [Expand]Office Document Management
   Cloud Storage Account Management
  [Expand]Web Farm and Web Garden Support
 [Expand]ASP.NET WebForms Controls
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

DevExpress Resource Management Mechanism

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.

Expanded 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:

    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.

Is this topic helpful?​​​​​​​