Blogs
Syncfusion .NET CLI automating .NET MAUI project setup

Summarize this blog post with:

TL;DR: Tired of configuring the same things every time you start a .NET MAUI project? Discover how Syncfusion .NET CLI automates project creation, adds Syncfusion controls, manages NuGet packages, and configures AI-assisted development tools to help you get started faster.

Building a .NET MAUI application often starts with more than creating a project. Before you can evaluate a control or begin implementing features, there are usually several setup tasks to complete: installing packages, registering controls, updating configuration files, and verifying everything runs correctly.

None of these steps are particularly difficult. The challenge is repeating them every time you create a proof of concept, prototype a feature, or start a new internal project.

That’s where Syncfusion .NET CLI can help. Instead of manually performing the same setup tasks across projects, you can automate much of the initial configuration and start with a ready-to-run application that already includes the controls you need.

In this blog, we’ll explore how Syncfusion .NET CLI simplifies .NET MAUI project setup, where it fits into a typical development process, and how it can help you move from a blank project to a working application more quickly.

Install and launch Syncfusion .NET CLI

Before creating a project, install the Syncfusion .NET CLI as a global .NET tool.

Prerequisites

Make sure you have the following installed:

  • .NET SDK.
  • .NET MAUI development workload.
  • .NET MAUI project templates.
  • An internet connection to access NuGet packages.

Install the Syncfusion .NET CLI using the following command:

dotnet tool install -g Syncfusion.DotNet.Cli

Verify the installation:

sf --version

To open the interactive CLI menu, run:

sf

The menu provides access to project creation, package management, package discovery, and other development operations.

Create a .NET MAUI project with Syncfusion controls

One of the main capabilities of Syncfusion .NET CLI is creating a .NET MAUI application with selected Syncfusion controls and their sample implementations.

For example, suppose you’re building a field-service management application and want to evaluate the Syncfusion DataGrid before integrating it into your project. Instead of creating a blank application and configuring the control manually, you can generate a project with the DataGrid sample included.

Follow these steps:

  • Run sf to open the CLI menu.
  • Select Create a new project.
  • Choose .NET MAUI as the platform.
  • Select the .NET MAUI application template.
  • Choose the target .NET version.
  • Enter the project name and location.
  • Select the option to include Syncfusion controls.
  • Choose DataGrid from the available controls.
  • Complete the project creation process.

The generated project includes the selected control’s NuGet package reference, configuration, and sample implementation.

You can then build and run the application to explore the DataGrid functionality.

Create a project using a command

You can also create a .NET MAUI project directly from the terminal.

To create a blank project:

sf new maui -n MyApp

To create a project with a DataGrid sample:

sf new maui -n MyApp --control datagrid

To include multiple controls, specify their identifiers:

sf new maui -n MyApp --control datagrid listview

This approach is useful when creating projects through scripts or when you want to reuse the same project-generation workflow.

Explore the available .NET MAUI controls

The CLI supports several Syncfusion .NET MAUI controls that you can include when creating a project.

Some examples include:

  • AI AssistView
  • Cartesian Chart
  • Circular Chart
  • DataGrid
  • Diagram
  • Kanban
  • ListView
  • PDF Viewer
  • Rich Text Editor
  • Scheduler

The available controls may vary by CLI version. Use the package discovery commands to check the controls supported by your installation.

Add Syncfusion controls to existing .NET MAUI applications

You don’t have to create a new project to use Syncfusion .NET CLI. You can also add Syncfusion controls to an existing .NET MAUI application.

For example, to add the DataGrid package, run:

sf add maui datagrid

To add the Scheduler package:

sf add maui scheduler

You can also use the full NuGet package ID:

sf add maui Syncfusion.Maui.DataGrid

Note: Package operations add or update NuGet references. In a project generated by the CLI, supported control aliases can also integrate their corresponding sample implementations. In an ordinary existing project, adding a package does not automatically generate control files.

If you want to add generated samples to an existing project, use the --control option:

sf add maui --control datagrid listview --path ./MyApp

This lets you integrate the required Syncfusion packages into an existing application without manually editing the project file for each package.

Configure AI-assisted development with Syncfusion MCP and Skills

In addition to project creation and package management, Syncfusion .NET CLI provides commands for configuring AI-assisted development tools.

These integrations help AI coding assistants access Syncfusion documentation and component-specific guidance when generating or modifying application code.

1. Configure Syncfusion MCP

The Syncfusion Model Context Protocol (MCP) server provides AI coding assistants with access to Syncfusion documentation and product knowledge.

To configure MCP, use the following command:

sfdotnet mcp init

During the interactive setup, select the .NET MAUI platform, choose your AI coding client, and provide the path to your Syncfusion MCP API key file.

The CLI creates the required project-local configuration for the selected client.

The MCP integration can help AI coding assistants work with Syncfusion APIs and documentation when implementing controls in your .NET MAUI application.

Prerequisites:

Keep the API key file outside your source-controlled project directory. After configuration, open or reload the workspace in your AI coding client and verify that the MCP server is available.

2. Install Syncfusion Skills

Syncfusion Skills provide AI agents with product-specific guidance for working with Syncfusion components. They help agents understand component APIs and recommended development patterns when generating or editing code.

To install the .NET MAUI component skills, run:

sfdotnet skills install maui

You can use the interactive setup to select the AI agents and the skills you want to install.

Unlike MCP configuration, installing component skills does not require a Syncfusion API key or license. However, the installation requires Node.js, npm, and Git.

After installation, reload your workspace in the AI coding assistant so it can use the newly installed skills.

3. View CLI and environment information

To inspect CLI and environment details, run:

sfdotnet info

This command helps you review the installed CLI and environment information when troubleshooting setup-related issues.

Explore additional Syncfusion .NET CLI commands

Apart from creating projects and adding controls, the CLI provides commands for package discovery and maintenance.

TaskCommand
Update a Syncfusion packagesf update maui datagrid
List available .NET MAUI packagessf list maui packages
List installed packagessf list maui installed
Search for packagessf search maui grid
View CLI informationsf info
Display helpsf help maui

These commands help you discover available packages, review existing dependencies, and manage Syncfusion package references from the terminal.

Frequently asked questions

1. Can Syncfusion .NET CLI add controls to an existing .NET MAUI project?

Yes. You can use the CLI to add Syncfusion NuGet packages to an existing project. For example, sf add maui datagrid adds the DataGrid package reference. You can also use the --control option to add supported sample implementations.

2. Does Syncfusion .NET CLI generate a license key?

No. The CLI does not generate a Syncfusion license key. You must follow the applicable Syncfusion licensing requirements and register the license key in your application.

3. Can I use Syncfusion .NET CLI with AI coding assistants?

Yes. The CLI provides MCP configuration and component Skills installation. MCP gives supported AI coding clients access to Syncfusion documentation and product knowledge, while Skills provide component-specific guidance to AI agents.

4. Does the CLI replace the regular .NET MAUI development workflow?

No. The CLI automates project creation and common package-management tasks. You still use your regular .NET MAUI development tools and workflows to implement application logic, build features, test, and deploy your application.

Conclusion

Setting up a .NET MAUI application involves more than creating a project. Integrating controls, managing dependencies, and configuring development tools can add several repetitive steps to the initial workflow.

Syncfusion .NET CLI simplifies these tasks by letting you create projects with selected controls, add packages to existing applications, and configure AI-assisted development tools. Whether you’re evaluating a component, building a proof of concept, or preparing a project for your team, the CLI provides a convenient way to get started.

Explore the Syncfusion .NET CLI documentation to learn more about its commands and capabilities.

Existing Syncfusion customers can access the CLI through the License and Downloads page. New users can start with a 30-day free trial and explore Syncfusion .NET MAUI controls in their applications.

For questions or feedback, visit the Syncfusion support forums, support portal, or feedback portal.

Meet the Author

Shalini Suresh

Software developer with a strong focus on .NET MAUI and cross-platform development. Dedicated to creating high-quality applications that are reliable, user-friendly, and easy to maintain. Enjoys transforming complex ideas into simple, effective software.