Skip to main content
All docs
V21.2
.NET Standard 2.0+

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.v21.2.dll

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