Hello World with VS 17.4.4 DOT NET MAUI Note
kagula@2023-1-12
Prologue
If you touched XAML, well here is a concise guide for you running the first MAUI project.
Content
System Requirement
【1】Microsoft Windows [Version 10.0.19044.2486] Chinese Language
【2】Visual Studio Community 2022 (Version 17.4.4) English Language
Installation
You should install ‘.NET Multi-platform App UI development’ component first for MAUI project.
My First MAOI “Hello World” project
First Step: Create the first MAOI project
[Create a new project] -> [.NET MAUI App] -> [Name the new project is ‘MauiAppHelloWorld’] -> [ Framework select .NET 7.0 (Standard Term Support)]
After creating the new project, look around.
Second Step: Enable Developer Mode
Pic1 Open Setting Window
Pic2 Enable Developer Mode
Last Step: MS VS (Version 17.4.4) Run Problem
If you run the program have ‘The program '[23196] MauiAppHelloWorld.exe' has exited with code 2147942405 (0x80070005).’ Problem.
Solution:
Now go to the windows start menu, right-click the app you just build: More => Run as Admin.
The app will start and so will every other MAUI app from now on even when started within Visual Studio.
Reference
[1]
Supported platforms for .NET MAUI apps - .NET MAUI | Microsoft Learn
[2]
MAUI apps crash on launch on Windows after Visual Studio update - code 2147942405 (0x80070005) · Issue #12080 · dotnet/maui · GitHub