-
-
Notifications
You must be signed in to change notification settings - Fork 11
Getting started for MAUI development with DotNet.Meteor extension
Nikita Romanov edited this page Feb 17, 2024
·
6 revisions
The latest .NET version. Please refer to the .NET installation guide if you faced any issues.
Afer installing, run the dotnet --version
command in terminal to make sure that everything is installed correctly:
> dotnet --version
7.0.102
-
In the Windows command line, call the following command to install the
maui-windows
workload:> dotnet workload install maui-windows
-
Now you can create a MAUI application.
-
Install XCode.
-
Install the required workload:
- Run the following terminal command if you develop MacOS applications (mac-catalyst):
> sudo dotnet workload install maui-maccatalyst
- Run the following terminal command if you develop iOS workload:
> sudo dotnet workload install maui-ios
- Install the Java Runtime Environment.
- Install the Android SDK. The easiest way to install it, is install the Android Studio. To install the Android SDK only, use the commandline-tools.
- To test your application on Android Emulator, create a Android Virtual Device (AVD).
- Call the following command to install a .NET MAUI Android development workload:
- Windows
> dotnet workload install maui-android
- MacOS/Linux
> sudo dotnet workload install maui-android
- Windows
- Create your MAUI application.
- Create a folder.
- Navigate to that folder in terminal.
- Call the
dotnet new maui
command to create an application. -
Optional Step. Open the folder in VSCode and remove unnecessary platfroms from the
.csproj
file:<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <!-- Remove unused platforms --> <TargetFrameworks>net7.0-android;net7.0-ios</TargetFrameworks> ... <!-- Remove unused os versions --> <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion> </PropertyGroup>
-
Optional Step. Remove unnecessary platforms from the project's
Platforms
folder. - Sweet! Now you can run the application or customize run tasks.