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 controls in a MAUI application, you can enable trim operations for the DevExpress.Data library. To do this, include the following line in the project file (.csproj). Note that our Project Templates add this line automatically.

<ItemGroup>
    <PackageReference Include="DevExpress.Maui.DataGrid" Version="23.2.*" />
    <TrimmableAssembly Include="DevExpress.Data.v23.2" />
</ItemGroup>

Important

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.