Skip to main content
All docs
V25.1
  • Troubleshoot Design-time Issues

    • 6 minutes to read

    Important

    If a design-time issue occurs in a .NET 6+ application, refer to the following help topic: Design-Time Support for DevExpress WinForms Controls for .NET - FAQ.

    Design-time Errors

    The following table lists possible errors and corresponding sections with detailed information:

    Error

    Section

    • The type ‘X’ exists in both assemblies
    • Type ‘X’ is ambiguous in the namespace ‘Y’
    • [A] cannot be cast to [B]. Type A originates from ‘X’ in the context ‘Default’…
    • Error CS0012 The type ‘X’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘Y’ Error Creating Control
    • The call is ambiguous between the following methods or properties: X and Y
    • NullReferenceException in DevExpress.XtraEditors.Repository.RepositoryItem.CreateDesigner: at DevExpress.XtraEditors.Repository.RepositoryItem.CreateDesigner() at DevExpress.XtraEditors.Repository.RepositoryItem.FilterProperties(PropertyDescriptorCollection collection) at DevExpress.XtraEditors.Repository.RepositoryItem.System.ComponentModel.ICustomTypeDescriptor.GetProperties(Attribute[] attributes) at System.ComponentModel.TypeDescriptor.MergedTypeDescriptor.System.ComponentModel.ICustomTypeDescriptor.GetProperties(Attribute[] attributes)

    These errors usually occur after an update to a newer DevExpress version. Refer to the following section for details: Incomplete Update.

    • Could not find type “xxx”. Please make sure that the assembly that contains this type is referenced.
    • The designer could not be displayed for this file because none of the classes it contains can be designed. The designer checked the following classes in the file: “xxx” — The base class “yyy” could not be loaded. Make sure the assembly is referenced and that all projects have been built.

    Architecture/Version Conflict

    • The designer loader did not provide a root component but has not indicated why
    • Other errors

    Design-time Exception

    Incomplete Update

    At design time, the IDE attempts to load control metadata and assemblies. If assemblies are mismatched, duplicated, or missing, the designer cannot resolve type information. An error indicates that the project was not updated completely (for example, the framework tries to load older assemblies that were replaced).

    The following steps should help resolve the issue:

    Close all currently opened designers.
    The designer may hold stale references to old DLLs that interfere with the upgrade.
    Clear Bin and Obj folders.
    They may contain compiled binaries from the previous version.
    Remove the licenses.licx file.
    It may still reference outdated DevExpress assemblies.
    Run the Project Converter again.
    Ensure that all projects in your solution and all DLLs that use our components (directly or indirectly) are updated and reference required DevExpress assemblies.
    Restart Visual Studio.
    Visual Studio caches loaded assemblies in memory. The cache may contain outdated assemblies.
    Rebuild your project.
    This action recreates designer metadata and ensures that all source files are recompiled against updated assemblies.

    Architecture/Version Conflict

    As a starting step, rebuild and clean your solution, remove Bin and Obj folders and the licenses.licx file, and restart Visual Studio.

    Target Platform Mismatch

    Visual Studio is a 32-bit application. To visualize a form, it has to load all referenced assemblies at design time. If the Platform target option is set to x64, Visual Studio cannot load a compiled 64-bit assembly in its 32-bit environment, and an error occurs.

    As a solution, temporarily set the Platform target option to Any CPU to generate an assembly that Visual Studio can load.

    Version Incompatibility

    The error may occur because the project’s framework version is not compatible with the installed DevExpress version.

    To resolve the issue, use a framework version compatible with installed components: Prerequisites.

    Design-time Exception

    If the designer could not build a form/control due to an inner exception, it may not capture the actual cause and display a general message (for example, the designer swallows the original exception). Investigate the internal failure that triggers the exception to resolve it effectively:

    1. Obtain the exception’s call stack as described in the following help topic: Get Exception Call Stack Of Design-Time Errors In Visual Studio.
    2. Search for the call stack error message on the web or in our Support Center to find a solution.

    Performance Drop/Freeze

    The Visual Studio Designer can experience performance degradation or freezes due to design-time exceptions, installed Visual Studio extensions, or an open Document Outline window.

    To speed up the Visual Studio Designer, do the following:

    Deactivate all Visual Studio extensions
    Eliminate extension-related issues.
    Close the Document Outline window
    Reduce layout recalculations and UI updates during design-time rendering.
    Check for design-time exceptions
    Obtain the exception’s call stack and investigate the stack trace to identify the culprit. Refer to the following help topic for more information: Application Crashes or Throws an Exception.

    The following issues may occur:

    • Components are not displayed in the Toolbox.
    • An error/exception occurs when the Toolbox is loaded or when a component is dropped from the Toolbox.

    Take the following actions to resolve the issue:

    • Make sure that the DevExpress version is compatible with your Visual Studio version. The following help topic contains a table of supported versions: Prerequisites.
    • DevExpress components v18.2+ can only be used in projects that target .NET Framework 4.5.2+. Make sure that your project’s target framework is set to .NET Framework 4.5.2 or newer.
    • Click the Repair Toolbox command in the Visual Studio Toolbox context menu to repair the Toolbox.

    Refer to the following help topic for more information: Troubleshoot Toolbox Items in Visual Studio.

    Unexpected Component Size Changes

    The following issues may occur:

    • Grid column widths are increased every time you open the Visual Studio designer.
    • Control size is different when the application runs on another machine.

    This behavior usually takes place if you design the application on a screen with non-default DPI settings (more than 100%).

    Refer to the following help topic for additional recommendations: How to Build HDPI-Ready Applications.

    Form Surface Is Not Displayed

    The component tray can overlap the form surface.

    To resolve the issue, check whether the component tray height ($this.TrayHeight) is serialized in form resources (the .resx file). If it is, decrease the height.

    Contact Support

    This troubleshooting guide mentions the most common design-time issues. If none of the techniques listed here apply to your application, search the web or use the DevExpress.com Search Engine. If you cannot resolve your issue, submit a ticket to our Support Center. To help us assist you efficiently, please include:

    • A small, compilable test project.
    • Exception details (if applicable).
    • Steps to reproduce the issue.
    • Expected results.
    • Any relevant screenshots, videos, or other supporting materials.
    See Also