Skip to main content
All docs
V25.1
  • .NET Framework 4.6.2+

    FrameworkSettings.DefaultSettingsCompatibilityMode Property

    Sets configuration options and feature toggles to match the default behavior of the specified version of DevExpress frameworks and libraries.

    Namespace: DevExpress.ExpressApp

    Assembly: DevExpress.ExpressApp.v25.1.dll

    NuGet Package: DevExpress.ExpressApp

    Declaration

    public static FrameworkSettingsCompatibilityMode DefaultSettingsCompatibilityMode { get; set; }

    Property Value

    Type Description
    FrameworkSettingsCompatibilityMode

    The version of DevExpress frameworks and libraries. XAF sets configuration options and feature toggles to match the selected version’s default behavior.

    Remarks

    When you upgrade your application to DevExpress frameworks and libraries v20.2, the Project Converter sets the DefaultSettingsCompatibilityMode property to v20_1. This allows you to avoid breaking changes or unexpected behavior that new feature toggles and configuration options may cause. You can also set the DefaultSettingsCompatibilityMode property to another DevExpress version to retain this version’s feature toggles and configuration options when you update an application.

    If you want to automatically enable all the options for the latest version, set the DefaultSettingsCompatibilityMode to Latest (the Solution Wizard sets this value for all applications created in v20.2 or later). In this case, you do not need to specify the options individually or check their compatibility. If some of these options cause issues with your application, you can change their values after you initialize the application. Options specified directly in code have a higher priority than DefaultSettingsCompatibilityMode.

    The following examples show how to specify this property in your applications:

    WinForms Application

    File: MySolution.Win\Program.cs (Program.vb)

    using DevExpress.ExpressApp;
    // ...
    public class Program {
        static void Main(string[] arguments) {
            FrameworkSettings.DefaultSettingsCompatibilityMode = FrameworkSettingsCompatibilityMode.v20_2;
            // ...
            MySolutionWinApplication winApplication = new MySolutionWinApplication();
            // change a feature toggle value here
            // ...
        }
        // ...
    }
    

    ASP.NET Web Forms Application

    File: MySolution.Web\Global.asax.cs (Global.asax.vb)

    using DevExpress.ExpressApp;
    // ...
    public class Global : HttpApplication {
        protected void Application_Start(object sender, EventArgs e) {
            FrameworkSettings.DefaultSettingsCompatibilityMode = FrameworkSettingsCompatibilityMode.v20_1;
            // ...
        }
        // ...
    }
    

    ASP.NET Core Blazor Application

    File: MySolution.Blazor\Program.cs

    using DevExpress.ExpressApp;
    // ...
    public class Program {
        public static void Main(string[] arguments) {
            FrameworkSettings.DefaultSettingsCompatibilityMode = FrameworkSettingsCompatibilityMode.v20_2;
            // change a feature toggle value here
            // ...
        }
        // ...
    }
    

    The following code snippets (auto-collected from DevExpress Examples) contain references to the DefaultSettingsCompatibilityMode property.

    Note

    The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

    See Also