Skip to main content

Enable Trimming to Reduce MAUI App Size

Our NuGet packages reference native assemblies/resources. Since these native parts are compiled into the app bundle when you reference a NuGet package even if you do not use it, we recommend you to remove all unused DevExpress MAUI NuGet packages to reduce the deployment size of your app.

If you use DevExpress MAUI controls in your application, trim operations for the DevExpress.Data library is enabled out-of-the-box.

The following code snippet disables DevExpress.Data trimming:


Refer to the following topic for more information on build settings: Build Settings.

If you use a version before 24.1, you should enable trim operations for the DevExpress.Data library manually. To do this, include the following line in the project file (.csproj).

    <PackageReference Include="DevExpress.Maui.DataGrid" Version="24.1.*" />
    <TrimmableAssembly Include="DevExpress.Data.v24.1" />


The DevExpress.Data library is adapted to be trimmed when using with DevExpress MAUI components. If you use DevExpress.Data API directly or use other libraries that reference it, do not enable trimming to avoid unexpected runtime exceptions.