Setup Your .NET MAUI Dev Environment - .NET MAUI Tutorial Step-By-Step
Ғылым және технология
This video is part of a crash course to build your first .NET MAUI app. The next part of this course is found here: • Project Structure/Sing...
In this video we are going to install Visual Studio 2022 and the .NET MAUI workload. From there we will proceed to setup an Android emulator, see how to enable Developer Mode on Windows 11 and even how to connect to a Mac build host. After this video you'll be ready for .NET MAUI development!
💝 Join this channel to get access to perks:
kzread.info/dron/ral.html...
Disclaimer: this channel is done on personal title, in my free time, and not officially affiliated with or endorsed by Microsoft (my employer) in any way. Opinions and views are my own.
🛑 Don't forget to subscribe to my channel for more cool content: kzread.info...
🐦 Follow me on Twitter: / jfversluis
🤝 Join the Discord server: / discord
🔗 Links
.NET MAUI Docs: docs.microsoft.com/dotnet/maui/
.NET MAUI Crash Course Playlist: • Learn to Build Your Fi...
Workshop Repository: github.com/jfversluis/dotnet-...
Download Visual Studio: visualstudio.microsoft.com
Android Emulator Docs: docs.microsoft.com/xamarin/an...
Setup Mac Build Host Docs: docs.microsoft.com/xamarin/io...
Windows Enable Developer Mode: docs.microsoft.com/windows/ap...
⏱ Timestamps
00:00 - Setup Your .NET MAUI Dev Environment
00:39 - A Note About Previews and Releases
01:57 - Install Visual Studio (FREE Version!)
04:40 - Create Your First .NET MAUI Project
07:39 - Setup Android Emulator
09:28 - Android Emulator Performance
10:27 - Enable Hyper-V Support
12:42 - Enable Windows Developer Mode
14:56 - What About iOS and macOS?
16:39 - Setup Mac Build Host for iOS Development
20:55 - Explore the Android Emulator
27:14 - What Did We Learn?
🎥 Video edited with Filmora
🙋♂️ Also find my...
Blog: blog.verslu.is
Twitch: / jfversluis
All the rest: jfversluis.dev
#dotnetmaui #maui #dotnet6
Пікірлер: 154
OMG, this is a very high quality course! I didn't expect it to look so good
@jfversluis
2 жыл бұрын
Thanks! That means a lot 🙏 glad you like it!
Thank you for this Amazing Crash course. .Net Maui Blazor series will also be much appreciated 🙏
@jfversluis
2 жыл бұрын
I’ll work on it! Thank you!
Thanks for going through the emulator setup. I was not getting hot reload behavior and it was really frustrating to tweak my UI, but once I figured out I was running HAXM instead of Hyper-V I switched and now hot reload works again!
@jfversluis
Жыл бұрын
That is great! Thanks for letting us know!
Thanks Gerald for the course. :) Definitely a Blazor course is really needed one.
@jfversluis
2 жыл бұрын
You're welcome! I'll work on the Blazor one, thanks!
Thank you for the fantastic quality and walkthrough! It would be wonderful if in the future you created an MAUI + blazor crash course!
@jfversluis
2 жыл бұрын
Thanks Sérgio! The Blazor one is definitely also coming!
@DanielHarrisCodes
Жыл бұрын
@@jfversluis Did you ever do the Blazor one?
@jfversluis
Жыл бұрын
@@DanielHarrisCodes not yet! Still on the list 😅
@sultanaq7
9 ай бұрын
@@jfversluis Hi brother Did you create a MAUI + Blazor in thisTime??
Great content! Keep it up.
@jfversluis
2 жыл бұрын
Wow thank you Rei! Appreciate the support! Stay tuned for the next ones!
Live preview is back!!!.. Love it...
@jfversluis
2 жыл бұрын
Yay! 💜
Thank you so much for the amazing tutorial ✨✨
@jfversluis
Жыл бұрын
You’re very welcome, glad you liked it!
I applaude this video. i don't know what you did, but it clicked with me. its a personal thing i guess. great work gerald.
@jfversluis
2 жыл бұрын
Ha well great Paul! That is wonderful to hear! You already made my weekend!
Hi Gerald, where do you store api keys, and api secrets in Xamarin Forms or .Net Maui in Visual Studio, as these softwares do not have an appsetting file?
Amazing tutorial!
@jfversluis
Жыл бұрын
Thank you so much!
This will be great :D
@jfversluis
2 жыл бұрын
I hope so!
Thank you very much Gerald. My answer is YES for a special video for .NET MAUI Blazor App. This would be wonderful. Thx.
@jfversluis
Жыл бұрын
Thanks François! I’m working on it!
Good amount of details. Good for reference. 👍
@jfversluis
2 жыл бұрын
Thank you Anand!
I'm following the video series closely. Congratulations
@jfversluis
2 жыл бұрын
That is great, thank you so much!
your maui blazor course would be really helpful thanks Gerald
@jfversluis
2 жыл бұрын
Will work on that one, thank you!
thank you for your help, but want to mention that the android have not work in my case until I download and install all sdk component of the api that used by the emulator, api 30 in my case ,Is there some reasons for that
Hey Gerald thank you for this video , i have a question is it net maui app size is less than xamarin forms ?
@jfversluis
2 жыл бұрын
Details about app size and startup time will become available when we go GA. I know the startup time has improved!
Yes. Please do the Blazor!
@jfversluis
2 жыл бұрын
Will do, but it might be a little while. These courses take time 😅
@B-a_s-H
2 жыл бұрын
+1
Hi, do you have issues with Visual Studio not seeing the Android-simulated devices? When I start Visual Studio 2022 and open the Android solution/project, it does not recognize already created Android devices. In order to run the application, I have to create a new device and then the previously created device that is running is displayed in visual studio. Do You have any tips/tricks on how to fix this? This issue can be problematic on devices where You do not have administrator rights (workstations) so You can't run anything.
Great vid! BTW there is Windows Developer mode in Win10 as well.
@jfversluis
2 жыл бұрын
Perfect! Thanks for letting me know!
💡Looking for the next part in this course? Click here to find it, all about the single project approach in .NET MAUI: kzread.info/dash/bejne/YoR2uLWGhNKnY6Q.html Want to review the full playlist? You can do that here 👉kzread.info/dash/bejne/n5uLmNqvmczYgc4.html
Hi Gerald, firstly thank you for the endless help and insight you provide. I just have one question, I have been passing an object to a new page by using the following - Navigation.PushAsync(new CoursePage(selectedCourse)), where Course is a Model, and receiving with the following - public CoursePage(Course Course). This has been working perfectly but will this simple method continue to be available moving forward.
@jfversluis
2 жыл бұрын
Yes, absolutely! But you might want to change it to use Dependency Injection :)
@karenbozoky8747
2 жыл бұрын
@@jfversluis Thanks, will do.
@johnwarren7722
2 жыл бұрын
Thank you, change has been done and working.
Oooo very cool
@jfversluis
2 жыл бұрын
Glad you like it!
That's Jerald Waiting for more
@jfversluis
2 жыл бұрын
Next one on Friday!
I have a MacBook Air M1 16Gb but I did not intend to work on it. It's definitely powerful enough but I wonder if it being passively cooled will be a problem?
@jfversluis
2 жыл бұрын
Definitely no problem, that should work fine!
Thank you ❤ Free good video. We want a MAUI + Blazor course⚘️
@jfversluis
9 ай бұрын
What do you want in that course?
@sultanaq7
9 ай бұрын
@@jfversluis I want Learn how to Create a simple apk that includes adding user and forget user. and connect the apk to SQL Server database
fantatisc video.
@jfversluis
11 ай бұрын
Thanks so much my friend!
Great Video Series - Love IT! QUESTION. Why did you Re-Image your laptop??? I have had problems with Apple Dev ever since the issue with Apple Certificates and Visual Studios issue...
@jfversluis
Жыл бұрын
Only did that so I could show the exact experience installing everything and getting it to run :)
Yes we interst to see blazor too :)
@jfversluis
2 жыл бұрын
Noted, thanks!
Great content. I also vote for a Maui Blazor course too.👍
@jfversluis
2 жыл бұрын
Perfect, thank you!
@paolatapiagarcia7599
2 жыл бұрын
Me too !
@jfversluis
2 жыл бұрын
I’m working on it 😏
We always get how to design and develop our app. But If possible can you make some videos on how to automate the builds and deployments with something like TEST, UAT, PROD or could have different configs settings that we need to inject according to the build in the pipeline.
@jfversluis
2 жыл бұрын
I'll think about it, thanks!
Great episode, the only issue I had was Hyper-V -- I had no option in my install list to enable that, took me ages to find out that it was only Windows PRO+ and NOT windows HOME - they never mentioned that on the document you showed: @11:23 - and for the Hyperversion Platform, I had to go into my BIOS settings to turn that on....
@jfversluis
Жыл бұрын
There is a thousand nuances to setting this up. It’s near impossible to write it all up or show it all. But glad you figured it out!
@harag9
Жыл бұрын
@@jfversluis Ya. My Emulator was running really slow and I downloaded something called GenyMotion emulator, but that's a paid for app. Even though I enabled the CPU for Virtualisation on the BIOS and turned on the 2nd option in the settings (No Hyper-V) the emulator is now up and running ok. The only problem I have now is that VS never launches the emulator (just freezes) so I have to launch it manually every time I start and not close the emulator. Not sure why it's doing that though... :(
Hi Gerald. Thanks for the series. Question : is there a minimum requirements for the Mac machine? Is it okay to be 5 years old or so?
@jfversluis
2 жыл бұрын
As long as it can run Xcode 13 it should be good! Of course older machines will make for longer build times
@billnalen
2 жыл бұрын
I run it on my 2015 15" MBP. It's the oldest laptop supported by the macOS Monterey. I tried to install it on my 2014 13" MBP yesterday, but that's not supported for Monterey and hence I can't use Xcode 13.
Hi Gerald... I have installed a clean Windows 11 with VS 17.3 Preview 1.1, created a new MAUI solution and it loads the project fine but when I compile got several errors like these: MAUIG1001 an error ocurred while parsing Xaml and CS0103 The name CounterBtn does not exist in the current context. Is there any fix for this ? Thanks a lot !
@jfversluis
2 жыл бұрын
That seems strange... Does this happen for all platforms?
@victorcorrales7152
2 жыл бұрын
@@jfversluis I create another project and now have no errors... strange things :D... thanks !
Hi Gerald , in Maui can we develop native applications like we did in xamarin native (Xamarin.Android and Xamarin.iOS) . If not then xamarin native will be dead ?
@jfversluis
2 жыл бұрын
Without the layer underneath .NET MAUI can't exist. We build on top of Xamarin.Android and Xamarin.iOS (which are now called .NET for iOS and .NET for Android) so those will still exist and you can still build for that if that's what you want
The default program on windows runs only within the Visual studio environment. The exe file it creates does nothing.
@jfversluis
2 жыл бұрын
If you're referring to the Windows app that is correct. The only scenario we support right now is publishing to an MSIX: kzread.info/dash/bejne/eIKr2MGQY7fag7g.html. We are working on making the so-called, unpackaged scenario work as well: github.com/dotnet/maui/issues/3166
I've just started today the course but using a Macbook, the pain is the VS for Mac supporting MAUI is still on preview and works bad as hell, I had to reinstall it a couple times because some tools like the Android Device Manager didn't show up (the menu option was disabled), also the VS crashes a lot of times when opening the Android emulators. The Course seems to be good.
@jfversluis
Жыл бұрын
Thanks Jorge! Sorry your experience wasn't great. I think this week VS Mac was released in stable with .NET MAUI support. Hopefully it will work better for you now!
I really like the light-weight nature of Visual Studio Code. At work I’m a many years user of regular Visual Studio. Would it be a mistake to learn MAUI development in VSCode?
@jfversluis
5 ай бұрын
Definitely not a mistake if you ask me. All the code and everything about .NET MAUI will be the exact same so learning that will not go to waste. The only thing that will be different if you ever switch is how you use the tooling but you’ll pick that up easy enough I’m sure
Do you or anyone know of a tutorial that explains in graphic detail how to navigate getting keys and such from Apple in the exactly correct sequence installed into the Mac version of Visual Studio and the Windows version of Visual Studio so that everything just works? I have a paid Apple dev account but for the life of me I am unable to figure out the correct process to make all this work and so far I've experienced nothing but failure at trying to set all this up between the Apple website(s) and Microsoft's website(s) and I'm lacking coherence here. I have a Mac Mini and a Windows PC basically dedicated to trying to get a hobby app for amateur radio together on my old iPhone - that's all I want to do.
In your opinion, would you just use a Mac for MAUI development? I know I can deploy to my iPhone from VS on Windows without a Mac with iTunes, but to deploy to the store, etc. I'll need to use the Mac. The Mac side would work with Android too (I'm not interested in desktop development at this point). However, I know VS on Windows is much better than VS on Mac. Do you feel like the tradeoff is worth it? What are the other developer advocates doing?
@jfversluis
2 жыл бұрын
I have been using Visual Studio for Mac mostly up until this point. So when that is back, and VS for Mac 2022 is very promising!, I'm looking forward to using that again. If you're not interested in Windows development, a Mac would definitely be my choice.
@billnalen
2 жыл бұрын
@@jfversluis Thanks for the answers. As far as I can tell, VS for Mac is getting a native rewrite (maybe just the UI?). Do you know if MS is using MAUI for this? Do you know if MS is using MAUI for anything? I was thinking since VS for Mac is getting a UI overhaul anyways they would use MAUI. I think it helps developers like me invest in the technology if I can see MS using it too.
@jfversluis
2 жыл бұрын
@@billnalen Interesting question! The UI is getting rewritten from GTK to native macOS components and its running on .NET 6 now. One of the wild ideas we have is definitely to add .NET MAUI and share UI between VS for Windows and VS for Mac. For now it's nothing more than something we're dreaming off though :D
I can´t get Maui windows emulator to connect to the internet. Any ideas?
@jfversluis
Жыл бұрын
What do you mean by Windows emulator? There isn’t really a Windows emulator
I am not getting xaml preview option can you help me out?
@jfversluis
Жыл бұрын
Check the documentation on where it should be and how to enable it. If it really isn’t there report it through the Help menu in Visual Studio and choose Provide Feedback > Report a Problem
Any chance you could do a video for Ubuntu and VS Code?
@jfversluis
2 жыл бұрын
You might be able to get it to run since much of this stuff is cross-platform, but right now that is not a officially supported combination
Hi Gerald. Thanks for the series. QUESTION. What is the .NET Maui Class Library? What is the difference between it and a normal .NET 6 (or standard) Class Library project? ALSO... It would be amazing to have that Blazor series. I am wondering if I can use the same blazor project for both web and MAUI application. Thanks
@jfversluis
2 жыл бұрын
The .NET MAUI Class Library has all the extra bits that allow you to write code for Android, Windows, iOS and macOS specifically. If you don't need platform-specific code you don't need it. I'm planning on doing something with .NET MAUI Blazor, but you won't get a target that runs on the web with that. Personally I feel more for the approach where you have Razor Components that you will reuse between web and mobile.
@Aliensfcul
2 жыл бұрын
@@jfversluis it makes sense. Thanks
@bsafer
2 жыл бұрын
@@jfversluis Thanks for this video series. To tack on to this question, if I have apps using Maui, but I also want a web interface to share the same libraries and code as those apps, would I create a sample Maui Blazor project then? And just use Blazor to drive the web side and the XAML/Code behind to drive the app side? This is what I've been waiting for Maui for, so hopefully thats how it will work. Thanks!.
this straight up kernel panic error, replicated with intel 12 gen and AMD ryzen (4000 & 5000)... my workaround is install android studio and flutter, run the flutter doctor until all done then proceed to install VS. Isnt MAUI should have a "MAUI doctor" too ?
@jfversluis
11 ай бұрын
Kernel panic sounds like Linux? Not sure what would cause that, first time I’ve heard of it. Also this video isn’t about Linux at all? That one can be found here: Develop .NET MAUI Apps on Linux with VS Code: Complete Guide kzread.info/dash/bejne/Znhm2LeShazXdrg.html
@enricoroselino7557
11 ай бұрын
@@jfversluis im on windows, its the android emulator related error
@jfversluis
11 ай бұрын
@@enricoroselino7557 oh interesting. Seems like something with the virtualization then. Glad you found a way that works for you!
I want to hide and show elements on button click. Is it possible in .Net MAUI
@jfversluis
2 жыл бұрын
Of course! You should be able to set the IsVisible
@a.anshal
2 жыл бұрын
@@jfversluis Thanks a lot
We wait small program in MAUI and Thank you
@jfversluis
2 жыл бұрын
You’re welcome!
Please do the Blazor one.
@jfversluis
2 жыл бұрын
I will but thanks going to take a little while
How to deploy automatic to a real Android device? To speed up the debug/Release process
@jfversluis
Жыл бұрын
Plug in your phone and select it in the run menu!
@Ork-Schamane
Жыл бұрын
@@jfversluis wow, is'n that easy...? visual studio is so good. Thx for your fast answery even on the weekend.
The IOS Simulator loads but the app doesn't. What could I be doing wrong?
@jfversluis
Жыл бұрын
Sounds like code in the app might cause it to crash at startup? Check the log output closely
@pebblesintheshoe4438
Жыл бұрын
@@jfversluis Thanks for you reply. However, it is the default first app generated by Visual Studio. Loads on Android and Windows simulators but nor on Iphone. The Iphone simulators loads but the app doesn’t show. I will look into the logs. Thanks.
RE: Hyper V activation On Windows 11 there is no "Optional Feature" named Hyper-V. Instead, all that needs to be done is to go into the windows options called "Turn Windows features on or off", then scroll down a little and enable "Windows Hypervisor Platform". Once this is selected, a restart will be required... and you should be good to go.
@jfversluis
Жыл бұрын
Thanks for sharing!
@leogsantos5
10 ай бұрын
i have done that, but i can´t click any buttons on my template app with counter weather forecast etc...
Do you have merch??
@jfversluis
2 жыл бұрын
I did! But I didn't have much of a brand yet then so I took it down again. It didn't make much sense :D What would you be interested in?
"Put the Mac somewhere where you don't have to see it." Nice 🤣
i don´t have the hyper-v option
@jfversluis
10 ай бұрын
Probably you have a windows version or computer that doesn’t support it :(
@leogsantos5
10 ай бұрын
@@jfversluis and can i connect Visual Studio to my Android Emulator from Android Studio?
Hi @Gerald my Boss ask me to give a presentation/demo on .net maui can you please give me some links or helping material?
@jfversluis
2 жыл бұрын
Absolutely, the repo for this course has slides: github.com/dotnet-presentations/dotnet-maui-workshop/tree/main/Slides But also check this one: github.com/dotnet-presentations/dotnet-maui Good luck with your presentation! Don't forget to mention this channel 😉
@MuhammadNadeem-wj6xd
2 жыл бұрын
@@jfversluis Thank you so much
yes for MAUI + blazor
@jfversluis
2 жыл бұрын
Working on it!
Hello, How can I run MAUI on IIS?
@jfversluis
2 жыл бұрын
You can’t. .NET MAUI is a UI framework that is meant to be run on client devices
@ramazankola3907
2 жыл бұрын
@@jfversluis But MAUI is based on Blazor! isn't it? Why I can't? Maybe it will come in the next version.
@jfversluis
2 жыл бұрын
.NET MAUI is not based on Blazor. You can use Blazor inside of .NET MAUI, but that’s it
Any guesses on when we'll have a stable Mac environment for MAUI? :-)
@jfversluis
2 жыл бұрын
This speaks of improvements throughout the summer so my guess would be near the end of the year: devblogs.microsoft.com/visualstudio/visual-studio-2022-for-mac-release-candidate/
Just to point out that Hyper-V is not available on Windows Home editions.
@jfversluis
2 жыл бұрын
Oh that’s right, thanks for pointing that out!
@johnmaguire2185
2 жыл бұрын
Win 11 pro is a very small cost upgrade. Definitely needed if you want to follow this course.
When is the official release?
@jfversluis
2 жыл бұрын
Past Monday! 😄
@AlexVitoriano
2 жыл бұрын
@@jfversluis but it doesn't work in the regular visual studio, only if you download the preview...
@jfversluis
2 жыл бұрын
Unfortunately yes. The tooling is still in preview
MAUI + Blazor please!
@jfversluis
2 жыл бұрын
I have the app ready, need to make it a course now but that might take a little while 😅
@josedonizeteoliveirajunior1744
2 жыл бұрын
@@jfversluis ok, it will be great
"Most people will work anyway", thanks for the video, but looking for mac stuff. Why don't set up with Parallels?
Moving into Maui. Quality content like this is lacking. Proper documentation is lacking. Sometimes I feel that open source projects have real edge on documentation over big corporations like MS
@jfversluis
2 жыл бұрын
This product isn’t even launched yet. Early adopters will always have trouble finding content in the early days. It’s all coming!
@silakanveli
2 жыл бұрын
@@jfversluis great! Keep this great content coming. Many 🙏