CLI Project Templates
- 4 minutes to read
CLI project templates allow you to create an empty DevExpress .NET MAUI application from a command line (both Windows and macOS). These templates are distributed as a NuGet package.
Execute the following command to install DevExpress MAUI project templates from nuget.org:
dotnet new install DevExpress.Maui.ProjectTemplates
If you get the NU1101: Unable to find package DevExpress.WPF.ProjectTemplates error, check whether the nuget.org source is enabled. To get a list of sources with their status information, call the dotnet nuget list source
command. To enable a source, call the dotnet nuget enable source <source name>
command.
If you are new to NuGet, visit the following page for more information about package management prerequisites: An Introduction to NuGet.
Note
DevExpress CLI project templates are available in the DevExpress NuGet Gallery (nuget.devexpress.com).
Create a Project
To create a new project, execute the following command: dotnet new dx.maui
. For example, the command below creates a blank Maui project called DxMauiTestApp in the current directory:
dotnet new dx.maui -n DxWpfTestApp
You can use the following parameters to see available command options: -? | -h | --help
.
For example, execute this command: dotnet new dx.maui --help
.
See also:
Additional Command Line Parameters
The following list contains available options you can specify when using DevExpress MAUI project templates:
-prerelease, --use-prerelease-dx-version
- A flag that indicates whether to use a pre-release DevExpress package version in the project.
--dx-version <version>
- Specifies DevExpress package version to be used in the project. Examples:
24.2.3
,24.2.*
,24.2.*-*
--dx-nuget-feed <feed>
- Specifies the NuGet Feed URL. Refer to nuget.devexpress.com to obtain your personal feed URL (available for registered users).
-nav, --navigation <flyout|none|tabbed>
Specifies the application navigation mechanism type. The following options are available:
flyout
- An application that uses a flyout menu to switch between pages.tabbed
- An application that uses tabs to navigate between pages.none
- A single page application with no specific navigation mechanisms.Default: flyout
-p, --platform <android|ios>
Defines the application target platform. The following options are available:
android
- The project should target Android platform.ios
- The project should target iOS platform.-m, --modules <none|mvvm|...>
Adds predefined modules to the app. The following options are available:
none
- Creates a project without additional modules.mvvm
- Includes infrastructure for the Model-View-ViewModel (MVVM) architectural pattern. The application supports Dependency Injection (DI) with a sample data service injected into the view model. MVVM integration is powered by the Microsoft application framework (CommunityToolkit.Mvvm).sqlite
- Includes detail and edit forms for a Collection View bound to an SQLite database. This module uses the Unit of Work and Repository architectural patterns to interact with the database.webapi
- Includes detail and edit forms for a Collection View bound to a Web API service-hosted database. This module uses the Repository architectural pattern to interact with the database.report
- Includes a pre-built tabular report bound to sample data (SQL, Object, or JSON). Report output is displayed in a PDF Viewer (requires a subscription that includes Reporting components.auth
- Includes a login form and a Collection View bound to a secure data layer powered by ASP.NET Core OData, EF Core, and XAF’s Backend Web API Service (requires the Universal Subscription). With this additional layer of protection (authentication, authorization, and encryption), mobile UI clients cannot access database connection information or modify database tables directly.office
- Includes basic logic to help you get started with Office File API to edit and process Word, Excel, and PDF files (requires the Universal or Office File API Subscription.-ps, --pages <none|detail1|...>
Adds predefined pages to the app. The following options are available:
none
- Creates a project without additional pages.detail1
,detail2
,detail3
,detail4
,detail5
- Add detail pages.edit1
,edit2
,edit3
- Add edit pages.login1
,login2
- Add login pages.settings1
,settings2
,settings3
,settings4
- Add settings pages.scheduler1
,scheduler2
- Add scheduler pages.tree1
- Adds a page with a Tree View.list1
,list2
,list3
,list4
,list5
,list6
- Add pages with a Collection View.