Skip to main content
.NET 6.0+

XafApplication.ApplicationName Property

Specifies the application’s name.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v24.1.dll

NuGet Package: DevExpress.ExpressApp

Declaration

public string ApplicationName { get; set; }

Property Value

Type Description
String

A string value that represents the application’s name.

Remarks

The ApplicationName value is not displayed in a UI (to set a visible name, use the XafApplication.Title or IModelApplication.Title property). Instead, it is used in the internal application flow. For instance, the ApplicationName is used to check if the database is compatible with the current application when the XafApplication.CheckCompatibilityType property is set to ModuleInfo. If the application name differs from the name stored in the database, the following error occurs in this mode: “Database is designed for the ‘MyApplication1’ application while you are running the ‘MyApplication2’ application”.

If you want to change the name stored in the database manually, locate the ModuleInfo table, and find the record with the True value in the IsMain column and update the Name value there:

UPDATE ModuleInfo SET Name='NewApplicationName' WHERE IsMain='true'

The ModuleInfo table is not created and the ApplicationName value is not stored in the database when the XafApplication.CheckCompatibilityType value is DatabaseSchema.

If you need to rename the application itself, use the Application Designer or set the ApplicationName property in code:

static class Program {
   static void Main() {
      //...
      MySolutionWindowsFormsApplication application = new MySolutionWindowsFormsApplication();
      application.ApplicationName = "MyApplicationName";
      //...
   }
}

When you create an XAF application using the Solution Wizard, the ApplicationName property is set to the application solution name.

Note

To use the same database in several XAF applications with the XafApplication.CheckCompatibilityType set to ModuleInfo, set the ApplicationName of all applications to the same value.

The following code snippets (auto-collected from DevExpress Examples) contain references to the ApplicationName 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