Share:

DotNet MAUI Installation | Saatody | Amit Padhiyar

DotNet MAUI Installation | Saatody | Amit Padhiyar

1] Download Visual Studio 2022 Preview
2] Must install these workloads
   2.1] Mobile development with .NET
   2.2] Universal Windows Platform development
   2.3] Desktop development with C++
   2.4] .NET Desktop Development
   2.5] ASP.NET and web development (required for Blazor Desktop and the BlazorWebView control)
3] Download and install 'Single-project MSIX Packaging Tools for VS 2022' (Visual Studio extension to create apps that target Windows UI Library (WinUI) 3).
4] For WinUI, You also need follow workloads...
   4.1] Universal Windows Platform development
   4.2] Desktop development with C++
   4.3] .NET Desktop Development
5] For WinUI, Make sure that, In 'Individual components' tab 'Windows 10 SDK (10.0.19041.0)' is required in the 'SDKs, libraries, and frameworks' section.
6] Check this also 'C++ (v142) Universal Windows Platform tools' is required in the 'Universal Windows Platform development' section.
7] In Visual Studio, Enable NuGet Package source. 
   7.1] select Tools -> NuGet Package Manager -> Package Manager Settings to open the Options dialog.
   7.2] Name: 'nuget.org' and Source: 'https://api.nuget.org/v3/index.json'.
8] Install the Windows App SDK Extension for Visual Studio.
   8.1] Download and install 'Project Reunion' Visual Studio 2019 extension.
   8.2] If extension is not available for Visual Studio 2022, then follow 'Alternative 1' and 'Alternative 2'.
9] Turn on developer mode from setting of Windows.
10] To use the WebView or BlazorWebView controls on Windows you need to install the WebView2 package.
11] Now use 'dotnet tool install -g redth.net.maui.check' command in CLI.
12] Then run 'maui-check' command in CLI (If some package not install in first attempt then run again this command).
13] Run Visual Studio 2022 and select MAUI template to create new project. (If template is not founded then follow Alternative 3 and Alternative 4).
14] If project gives error then also check Alternative 1 and Alternative 4.

For some reason, You should also follow these alternative steps.
Alternative 1] Select Tools -> NuGet Package Manager -> Package Manager Settings to open the Options dialog. Then General > Package Management > Select 'PackageReference' from dropdown.

Alternative 2] Go NuGet package manager and install And update (if already install then update)...
1] Microsoft.Maui.Dependencies
2] Microsoft.ProjectReunion
3] Microsoft.ProjectReunion.Foundation
4] Microsoft.ProjectReunion.InteractiveExperience
5] Microsoft.ProjectReunion.WinUI

Alternative 3] Run 'dotnet workload list' command in CLI. If you're not find following workloads then you need to install all workloads.
1] maui
2] microsoft-android-sdk-full
3] microsoft-ios-sdk-full
4] microsoft-maccatalyst-sdk-full
5] microsoft-macos-sdk-full
6] microsoft-tvos-sdk-full

Now install workloads by running 'dotnet workload install WorkloadName' (WorkloadName list is already defined above).
You can also update above workloads using 'dotnet workload update WorkloadName' CLI command.

I recommanded to install every workload which list is below.
(You can see these available workloads using 'dotnet workload search')
1] microsoft-android-sdk-full
2] microsoft-ios-sdk-full
3] microsoft-maccatalyst-sdk-full
4] microsoft-macos-sdk-full
5] maui
6] maui-mobile
7] maui-desktop
8] maui-core
9] maui-android
10] maui-maccatalyst
11] maui-ios
12] maui-windows
13] microsoft-tvos-sdk-full
14] microsoft-net-sdk-blazorwebassembly-aot
15] microsoft-net-runtime-android
16] microsoft-net-runtime-android-aot
17] microsoft-net-runtime-ios
18] microsoft-net-runtime-maccatalyst
19] microsoft-net-runtime-tvos
20] microsoft-net-runtime-mono-tooling

Alternative 4] Run 'dotnet new --list' command in CLI. If you can't find '.NET MAUI App' and '.NET MAUI Blazor App' template names then download follow extensions...
1] .NET MAUI Item Templates (by Vijay Anand E G)
2] .NET MAUI Project and Item Templates (Vijay Anand E G)

Source pages:
1] https://docs.microsoft.com/en-us/dotnet/maui/get-started/installation
2] https://marketplace.visualstudio.com/items?itemName=ProjectReunion.MicrosoftSingleProjectMSIXPackagingToolsDev17
3] https://docs.microsoft.com/en-us/windows/apps/windows-app-sdk/set-up-your-development-environment?tabs=visual-studio-2019#required-workloads-and-components
4] https://marketplace.visualstudio.com/items?itemName=ProjectReunion.MicrosoftProjectReunion
5] https://developer.microsoft.com/en-us/microsoft-edge/webview2/

Comments

Popular posts from this blog

Basic Audio Operations With MP3 And Wave Files Using NAudio C#

Get Color From Pixel C# WPF | Saatody | Amit Padhiyar

Create Drag And Drop Operation Between DevExpress GridControl And Custom WPF UI | Saatody | Amit Padhiyar