ModuleBase.Version Property
Gets the major, minor, revision, and build numbers of a module’s assembly.
Namespace: DevExpress.ExpressApp
Assembly: DevExpress.ExpressApp.v24.2.dll
NuGet Package: DevExpress.ExpressApp
Declaration
Property Value
Type | Description |
---|---|
Version | A Version object that represents the current module’s assembly version. |
Remarks
This property is used when the built-in Updater compares the module’s actual version with the module version in the database. If the actual module version is lower than the version in the database, an exception is raised; otherwise, the Updater updates the module version in the database to the actual one. This process is performed each time the application runs in the debugging mode, because each application has the following XafApplication.DatabaseVersionMismatch event handler, by default:
public partial class MySolutionWindowsFormsApplication : WinApplication {
private static void MySolutionWindowsFormsApplication_DatabaseVersionMismatch(object sender,
DatabaseVersionMismatchEventArgs e) {
if(System.Diagnostics.Debugger.IsAttached) {
e.Updater.Update();
e.Handled = true;
}
}
partial class MySolutionWindowsFormsApplication {
//...
private void InitializeComponent() {
//...
this.DatabaseVersionMismatch += this.MySolutionWindowsFormsApplication_DatabaseVersionMismatch;
// ...
}
// ...
}
For more information on updating database versions, refer to the Update Application and Database Versions using the ModuleInfo Table topic. If you need to implement your own Updater, use the Version property to get the actual module version.