Pradeep Kumar
Pradeep Kumar

Reputation: 119

Creating first .Net MAUI project

I tried to create Maui project in windows using visual studio developer command prompt using
Command :
dotnet new maui

But Its not creating Maui project,Getting Error message No templates found matching : maui
I installed the .Net 5 and visual studio 2019 in my machine.

Upvotes: 7

Views: 6732

Answers (5)

Download Visual studio 2022 preview the latest version and MAUI all the default templates are avilable now. try steps here - https://www.msdevbuild.com/2021/11/First-Xamarin-MAUI-Mobile-App-Ios-android-windwos-visual-studio-2022.html

Upvotes: 0

Jimenemex
Jimenemex

Reputation: 3176

It's now recommended to create .NET Maui apps with Visual Studio according to their current documentation.

Older suggestion:

I'd recommend using the check tool provided. This will install the templates for you and make sure everything else is present to develop using Maui.

Install: dotnet tool install -g redth.net.maui.check

Run: maui-check --dev

This will check for:

OpenJdk / AndroidSDK
.NET 6 Preview SDK
.NET MAUI / iOS / Android workloads and packs
.NET MAUI Templates
Workload Resolver .sentinel files for dotnet and Visual Studio Windows/Mac
Currently does not install workloads required for WinUI3

Upvotes: 6

Mando
Mando

Reputation: 11722

There is a known issue, please install the template manually:

dotnet new -i Microsoft.Maui.Templates

Upvotes: 17

Gary Lewis
Gary Lewis

Reputation: 45

For Visual Studio integration you need at least 16.11 preview 1. Use the maui-check tool to install/upgrade the prerequisites on your system. The tool is constantly updated to ensure that the latest MAUI capabilities are installed. Every time a new preview comes out (approximately monthly), rerun maui-check.

Upvotes: 2

Lukas M. Pagel
Lukas M. Pagel

Reputation: 221

This should help you out:

https://github.com/dotnet/maui

https://github.com/dotnet/net6-mobile-samples

Take a look at the section "Using IDEs":

Using IDEs

IDE integration into Visual Studio, Visual Studio for Mac, and Visual Studio Code are a work in progress.

Visual Studio

Currently, you can use Visual Studio 2019 16.9 on Windows (with the Xamarin workload) with a few manual steps to run iOS & Android apps built on .NET 6.

Upvotes: 2

Related Questions