Skip to main content
.NET 8.0+

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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

[Browsable(false)]
public virtual Version Version { get; }

#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.

See Also