Windows Environment Setup for MAUI Development (Windows Desktop Application)
Hi all, I saw Jetbrains team prepared well the documentation for macOS environment setup. I''m wondering if the team and the community here provide the documentation setup over Windows environment, especially MAUI for Windows desktop application.
Thank you
Please sign in to leave a comment.
Hello Kasyfillah,
I've spent all afternoon trying to get MAUI set up on a Windows Machine and here are the steps. You'll need the latest Rider EAP. Early warning though, we still don't have run configurations for Windows Desktop apps so it's not going to work for your use case yet. Please follow these steps:
Install .NET 6.0.300
You'll need to install .NET 6.0.300 first. The version of .NET is very important as the workloads are tied to the SDK version. Any version of .NET higher or lower will end up with incorrect or missing workloads.
Install Workloads
Run the following commands from a terminal. You will be asked to elevate permissions during the process.
OpenJDK 11 Install
Install OpenJDK 11 from this URL: https://aka.ms/download-jdk/microsoft-jdk-11.0.15-windows-x64.msi
Please note the install location.
Rider Environments
Install the Android and macOS environments from Rider's settings page. It should be under Environments. If it errors in the EAP, you can install it using the latest stable version of Rider.
Android Plugin for Rider
Install the Rider Xamarin Android Support. This will give you run configurations for Rider and MAUI. https://plugins.jetbrains.com/plugin/12056-rider-xamarin-android-support
MAUI Templates
When you ran `dotnet workload install maui` you should have also installed the MAUI templates. You can now create an MAUI project in Rider but you're not ready yet to run it.
Android Environment Settings
Under the Build, Execution, Deployment > Android section of your settings, you can now install an Android SDK and NDK. You can follow the macOS guide here.
Create a new Emulator Device targeting version 31 of the SDK. You may have to download this version in addition to the 33 version which is selected by default. If you don't see an option to select 31, install 33 first then go back and select 31 under Android > SDK Components in the SDK Platforms.
Start the Emulator.
Running The App
You should now be able to run an MAUI Android app. If it's your first time starting the Android Device, wait for it to boot up.
I hope this helps :)
- Khalid
Hi Khalid,
Is there any ETA on the run configurations for windows desktop apps?
Thank you Khalid Abuhakmeh. As already mentioned by Stokebrandgerwin. Is there any update corresponding Windows desktop app setup?
+1 for update on windows configuration support
Khalid, the original question was how to run/debug a Windows MAUI application, not Android.
This question is now over 10 weeks old.
+1 for Windows please.
Hello folks. As of JetBrains Rider 2022.2.2, there is no support for Windows-targeting apps (WinUI) built with MAUI applications but it is on the roadmap for our next release of 2022.3.
https://youtrack.jetbrains.com/issue/RIDER-66155/Add-support-for-WinUI-3
Please stay tuned.
I can now finally start a .NET MAUI App for Windows in Rider 2022.3.2. First, I got the error "Find package failed return code is 1" after the build, during the deploy step. In the Rider logs I found "UAC have to be enabled for WinRT applications". So I had to change my Windows "User Account Control Settings". Now it works. Glad to finally be able to code without VS.
I follow your method and run a MAUI windows Application successfully ! thank you ! @Andreas Gyr
It appears that the above also works with .NET 8 and OpenJDK 17.