liveBook · Manning

.NET CLI

As explained in .NET MAUI in Action

.NET CLI is the command-line interface for creating, building, running, testing, and managing .NET projects.

.NET CLI is a terminal-based way to create and run .NET MAUI applications. It offers a lightweight alternative to Visual Studio, with discoverable commands, templates, switches, and interactive help. section 2.1 section 2.1.2

Use the CLI's .NET MAUI templates to start different kinds of projects:

  • maui creates a standard .NET MAUI application. section 2.1.2
  • maui-blazor creates a .NET MAUI application whose user interface uses Blazor. section 2.1.2
  • mauilib creates a shared .NET MAUI class library, while maui-page-xaml and maui-page-csharp create pages with different UI definitions. section 2.1.2

Create and run Aloha, World!

Create and enter a folder, run dotnet new blankmaui, and inspect the generated solution files. To run the application for a target platform, use dotnet build -t:Run -f:net7.0-[target platform], such as dotnet build -t:Run -f:net7.0-ios. The build command locates a project or solution, builds it, and then runs it for the selected framework. section 2.1.3 section 2.2.3

mkdir AlohaWorld
cd AlohaWorld
dotnet new blankmaui

Use these terminal commands to create the initial project directory and apply the blank .NET MAUI template. section 2.1

How .NET MAUI in Action covers it

How deep it goes
Explains templates, default values, switches, help, and build-command anatomy through concrete project and platform commands.
Examples
Uses AlohaWorld and HelloWorld projects, blank templates, terminal listings, and iOS build-and-run commands.
What it assumes
Assumes a command-line terminal and basic .NET familiarity while teaching template discovery and command syntax through help.
What you can do after
Build it from scratch by creating a .NET MAUI project, customizing template options, and running it for a supported target platform.
How it connects
Connects .NET MAUI with project templates, Visual Studio, MSBuild, Blazor, XAML, and target platforms.

Also explained in

Compare how 2 books explain .NET CLI →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of .NET MAUI in Action. The section links point to the parts of the book it draws on.