.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

XafApplication.CheckCompatibilityType Property

Specifies how the database and application compatibility is checked.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v20.2.dll


public CheckCompatibilityType CheckCompatibilityType { get; set; }
Public Property CheckCompatibilityType As CheckCompatibilityType

Property Value

Type Description

A CheckCompatibilityType enumeration value specifying how the database and application compatibility is checked.


You can set CheckCompatibilityType to the following values.




The following checks are performed utilizing native XPO approaches:

  • The database exists.
  • All required tables exist.
  • All required columns exist.

The XafApplication.DatabaseVersionMismatch event occurs if any of these checks fails.


In the ModuleInfo mode, a ModuleInfo table is created in the database to check the compatibility of an application and its database. This table stores information on the module versions used in the application. When checking the compatibility of the database and the application, the versions stored in the ModuleInfo table are compared with actual module versions. The XafApplication.DatabaseVersionMismatch event occurs in case of a mismatch.

By default, each module's version is set to "1.0.*" using the AssemblyVersion attribute in the Properties\AssemblyInfo.cs file. The asterisk sign in the version indicates that the build and revision numbers in the version are autoincremented, and so the version value is updated with each new build. As a result, the WinForms and ASP.NET module versions may become unsynchronized if you build WinForms and ASP.NET applications separately (e.g, when creating a ClickOnce installation or deploying to IIS).

Note that the use of the ModuleInfo mode is more complicated, but it allows ensuring the business logic compatibility in addition to the data model compatibility. To learn more about this mode, refer to the Update Application and Database Versions using the ModuleInfo Table topic.

The CheckCompatibilityType property value can be changed in the Application Designer:


By default, CheckCompatibilityType is set to ModuleInfo in XafApplication code. However, the default value is overridden to DatabaseSchema in code generated by the Solution Wizard. This is done to keep the behavior of applications created in earlier versions unchanged.


The IObjectSpaceProvider.CheckCompatibilityType property allows you to specify the mode individually for each Object Space Provider (in case you use multiple databases).

See Also