.NET MAUI in .NET 8 - Everything you need to know!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hmm something seems a little bit different around here that's right.nate 8 for net Maui is here release candidate one just dropped with a go live license and it's time to get started oh and I'm back to Classic James ah where'd all my hair go and I got my classic c-sharp shirt on repping my xamarin days I'm back today to break down everything that you need to know about Donna Maui inside of Don at 8 how to get started what's new what's different so let's go [Music] thank you [Music] hey everyone I'm James and I'm back today with another video this time we are talking about Donna and Maui inside a.net8 specifically release candidate one now you might be watching this with release candidate 2 or just GA it doesn't matter because there is a go live license which means it's officially supported and you can now take advantage of everything inside of net 8 for Dynamo this means you get all the goodies right all the new c-sharp features all the new DOT net Eight Features all the performance enhancements all the new aot stuff that's built into it and tons of quality improvements and performance optimizations that the team has been working so hard on over the last year now I'm really excited about this release and I've been upgrading my projects to the different previews along the way but it's really really easy so if you're on done at six or done at seven it's super easy to get to.net 8 with.net Maui or if you're just doing coming in file new you're going to be right at home because file new is very similar to all of the other project templates with a small tweak so we want to go through how do you get it what happens when you create a new project and what are things that you need to know about when you update your existing dynamawi application so let's go ahead and get into it all right well let's just first talk about what's in Donna Maui inside of dotnet8 and there's a whole bunch of goodies for developers first I'm going to really talk about a lot but it's really a stability release quality improvement release lots of memory management perf improvements not only to dominate Maui but the underlying platforms of iOS Android Mac and of course Windows lots of top feedback and the UI controls that have been addressed so you definitely want to dive through the release notes for all the different previews it's fun just to scroll through them and see what the team's been up to and from the community as well pumping into this so ideally when you get up and running it just is working as expected also since a dynamic ships has a workload there's different intricacies there so there's some new commands to clean up those workloads but what I'm really excited about is nougat packages for preview so you can grab CI builds or different nightly builds or things like that which I'll talk about here and then also one of the cool themes in.net Maui itself is desktop support for mac and windows there's been a lot of enhancements since then that developers have been asking for one of the other ones I'm really excited about in.net 8 is a lot of like keyboard input and navigation commands as well so we'll take a look at that and then lots of goodies and hybrid in the Blazer hybrid web stack with Don and Maui so some new additions there and an experiment that I'm really excited for that I hope goes into done at nine at some point and then finally since you know dynamoe apps are native not only leveraging those native platforms there's a lot of things that we can do in the aot OR ahead of time compilation steps as well to make smaller and faster apps so I'll give you a breakdown of what's going on there let's first talk about keyboard improvements uh this is a major theme and a major sort of pain point for developers often especially on iOS with keyboards and overlapping and a whole bunch of things so there's been a lot of improvements originally in Maui and then there's a lot of improvements by the time Sam reforms you know hit the hit the end but really if you take a look at the far right over here there's a whole bunch of tabbing and auto focus scrolling and absolutely no keyboard overlap happening at all so you can see the xamarin forms one's pretty good but if we actually go over to the down at Maui one it's super awesome like you can next through everything everything moves around as you would want you can click off of it you can scroll you can have long input inside of here and just basically the keyboard acts as you would want it to which I'm really excited about and keyboard stuff is really hard in all platforms including the native ones uh to be honest with you so that's really awesome I also really love uh here's some additional desktop support So accelerator so the menu bar which I've done a video on it gets accelerator so what that means is you can add that control F for example or control n or things like that into it as well that works not only on Windows but of course it works over on the Mac so here for example is uh what David was showing off in the blog post that you can add those accelerators and add different flyouts and anything that you want into it and I do love his restaurant food application it's so pretty I love it so you can add those accelerators if you need them I talked a little bit about the experiment in a video so I'll put a link to that as well but the hybrid webview is pretty much awesome it enables you to bet embed any web content into a.net Maui app but still speak back and forth uh between um you know the JavaScript and the c-sharp code and then you can interact with the native platforms as well so you can reuse angular react and all that goodness there as well so it's really cool and you can blend and Blazer stuff if you wanted to so you get all that goodness in there which is rad let's talk about Native aot but I want to call it specifically iOS which a lot of work has done and Android of course tons of work being done as well so here for example on the top just a standard.net IOS app without Maui seems huge improvements here this actually from preview six so these numbers might even be better by the time GA hits as well what we're seeing is size on disk as a huge uh removal down from the mono aot to the native aot step the native aot is the one that's like kind of built into net which we've talked about on the channel before is my favorite features a.net 7 with Native aot and then also that actual IPA file is also greatly reduced same thing for adani Maui iOS application you know this reduces as well greatly too you know 31 30 and so much more so really awesome to see that all right well with that information and of course there's tons more built in to down in my 4.8 but I wanted to touch some highlights here is uh let's just get it up and get installing so of course I always highly recommend checking out all the release notes and the great blogs over on the.net blogs this here is specifically from David on the release candidate one now again there might be a two or three I'll you know or GA and I will post those and keep those up to date below but here he walks through all the improvements uh from memory UI platform performance links to release notes and the underlying Android iOS and Mac for net improvements as well here this one introduces xcode 15 support so you can search a Target iOS 17 which is really great in the in the betas and also gives you some updates on how to install it so there's two ways to get it let's go ahead and first check out getting it with visual studio 2022. now you're going to need version 17.8 now this is release candidate one so I'm on preview two your miles may vary based on when you're watching this video okay but all you need to do is just update that's it now as long as you've gone in and selected Dynam Maui that's going to install the release candidate bits and give you everything thing you need so here donet Maui Here app development and what you get with that is all.net Maui you get all the Android SDK setup things like that if you're still doing xamarin development still you can always check that checkbox and also get that xamarin support right there so it's all you need to do is install the preview and you're good to go if you're watching this after GA then you'll probably just install the non-preview but remember just like me you can run preview side by side non-preview so here's the current 1774 release that I happen to be running and that one has different workloads right so here I can go in and I can select these and I have Maui here as well but this will only be for.net7 or here I'm going to want the.net 8 which comes pre-installed with that now if you're rocking the vs code life or other editors or things like that you can go in of course and open up and your command line and you can type in net version and if you get back a version then you've installed.net8 or whatever you have if you haven't installed.net yet you're going to go over to the.net website Dot foreign click on download now again based on when you're watching this you're going to see one of two things you're going to see a big dot net 8 button down the boom you're good to go for GA also you're going to see this RC so you can click this get RC button this will take you to the downloads this will give you everything that you need based on what operating system you're on so if you're on Mac Windows Linux over here for your installers and you'll be good to go now Additionally you can then install the dot net SDK and then you're going to want to install the.net Maui workload so here if I do.net workload list list this is going to show me all of the workloads that I have and who is the source installer so we can see that I have the 8o RC and then here Visual Studio is the one that's installing these bits for me so that's kind of important to know there that's how this is working over there now if you don't have any of the dynamic stuff installed you can just say net workload install Maui and that will give you everything that you need and in fact if you go back over to this blog that is exactly what David said right there done at workload install Maui so I'll give you everything that you need right there now I'll link to additional documentation if you are going through that for your vs code setup make sure you get the extension and then of course make sure that you update your sdks get your emulators as well so I'll link to all that I'm a visual studio 2022 type of person over here so I can just go ahead and launch it now when we launch a visual studio 2022 we're going to note that we have so our templates so we can say file new project and what's great here is that the project templates are very very similar to the.net6 and Net 7 templates if I go and I do a drop down here to Maui we'll still see our Maui project our Blazer hybrid app and our class Library I can go ahead and create a.net Maui app we'll just go ahead and leave it as Maui app 5 and select next now you can select your framework version diversion seven and eight so obviously when it's like done at eight and select continue now this is going to give us everything we need for our.net Maui project we'll also get some nice overview so we get information about connected Services learning building Integrations deploying so we're looking to get started some great things here including some great beginner videos now over here uh if we zoom in we can see that we have all of our dependencies unfolded and for some reason uh your files aren't nested I found that actually unloading the project really quick and then reloading the project really quick seems to fix that up and now everything is unnested and nested and good to go which is great I've already reported that to the team so that might even be fixed by the time you see this all right now here we can go ahead and see all of our dependencies and all this goodness now if I double tap on the Maui program 5 I'll show you a few differences that you're going to need to know about in fact there's quite a few differences inside of here first and foremost is that if you want to upgrade your projects all you really need to do is simply change Net 7 to net 8. and if you just do that and you just type in Net 7 and uh you replace that with net 8 like this and just do a replace all in this file that will pretty much solve all the upgrading that you need now when you do do that upgrade you'll want to close all the visual studio delete your bin and obj file in there reopen it let everything rehydrate up and you'll be good to go besides that though you know that's one of the major differences is now targeting net 8. now there are some things for Mac Catalyst users and this is important because some of the runtime identifiers changed and specifically you'll want to note that here it's going to default to x64 but you can change this as well in the release configuration so the team put in this information here for Mac catalyst so definitely be aware if there's some changes there that's good now some other things here it looks like the app identifier grid that was used for Windows now maybe in the windows projects that's no longer there but I think that it still works if you override it as well then you can see the supported os's are also all the same and you shouldn't really have to change any of this this should all be exactly the same so no real changes there now if we scroll down a little bit more we'll get rid of that gold bar there we can see that pretty much everything else is again the same we have app icons Splash screens fonts raw image assets and here is the big big difference okay so specifically our two big differences one has to do with how the new packaging works for the controls and compatibility and different nugets that are installed and then additionally there are some other things for Mac Catalyst that's right more matte Catalyst stuff specifically how you bundle up your entitlements and P list files here for Mac Catalyst there's an aka.ms that you can go to here to learn more but pretty much this is saying in debug use my debug P list in release use that and additionally use the Harden run time if you are developing Mac applications there are different requirements you're going to need to know about so definitely read through that documentation all right so here's one thing that's very fascinating what is this Maui version and what are these Maui controls well this is something that you're going to want to add to your project if you are upgrading from seven to eight so I recommend just creating a new DOT and eight project and just going into the Cs project and aligning it up and I'm hoping that the team will put together the guide somewhere and if so I'll link it into the documentation now the biggest thing here is this new identifier this Maui version this is similar to for example these build Target framework identifiers that are going on here and then the same thing here with the target Frameworks or configurations this is a version number that is specified by the current version of.net and Maui workloads that are installed there are packages here which are the Maui controls and compatibility there's also a Maps control too that you can optionally install and you'd want to use the same Maui version here what this means is please use the Maui version that I have installed and it'll pull that down automatically the cool part here is that now that Maui being shipped basically as nougat packages optionally for these controls and compatibility layers it means that you can actually grab nightly builds or CI builds uh from the servers as well and you can specify the version or you can specify your own version here too to do that actually David specified this in the very first.net Maui and Dot Neta preview if you scroll down here you'll see that there are nuget packages so when they're reviewing pull requests unrelease experiments project versions you can actually grab details specifically here for example he shows you how to download artifacts and say oh I want to use this specific version I can add a property group to say I want to use this specific version so if you don't override that it'll use the default that's there else you can specify this but very specific version that you want you can also use nuke configs and a bunch of other stuff and again the link to documentation if available honestly that's about it to be honest with you there's the Mac OS changes for Mac catalyst and then these nuget packages that are here now one thing of interest if you are coming from.net6 is if you open up that Maui program here you'll notice one difference which is this logger for debugging that's been added here so this adds a debugger for a logger automatically that you can inject into different Services as well but besides that you still have your Builder you have your app patterns you have everything like that uh we can see that we still have our resources and our app icons our fonts our images raw assets Splash screens Styles all that goodness as well so everything is all the same here that we would expect from before so just be aware that if you are upgrading and you're going through this that all this stuff is going to be for all intents and purposes exactly the same same thing here if you go into your different resources uh here if you actually open this up we have a resource uh manifest viewer we have our main application we have our main activity all pretty much exactly the same which is kind of great because if you are upgrading from seven to eight there's going to be very very minimal changes same thing here you have all your different drop downs for your emulators for your local machine and you can just hit debug and go and then that will of course open up your main page and even still this is going to be pretty much identical you still have your labels your buttons your images on here that are being pulled from that SVG that are being transformed into different layers all right cool and there's our Windows application we have click me click me click me and of course you can open up things like the xamlive previewer here so you can get access to all that stuff you get the live visual treat you get all the goodies that are built in there that you would know and love by using visual studio and of course if you're using vscope you'll be able to deploy right to your iOS Android Windows devices based on the operating system that you are on all right well there you have it I want to show you how easy it is to just get started with.net for Don and Maui with Visual Studio or the command line and vs code whatever editor you're using and then additionally how easy it is to not create new projects but obviously upgrade and update your project there's really minimal differences in the Cs project it's really just going in adding a few little instances there of the new nougat packages and then changing Net 7 or net 6 to net 8 and you're good to go again make sure you close on Visual Studio delete your bin obj file reopen it up rehydrate everything and then go ahead and deploy and of course upgrade all your nuget packages that maybe you're using as well if things have upgraded and and come along take a look at all the release sounds I'll put links to all the blogs and any documentation I'll keep that up to date as it goes and don't forget there's tons of great Dynamic content on the.net Maui blog on the dynamic podcast and also at dot net conf happening in November the 14th through the 16th it's a free online virtual event for all of the.net 8 release and goodies built in in go to netconf.net to save the date and of course we look for the agenda and all the great things I'm super excited about it can't wait to see you there online virtually hope you enjoyed donating with Don and Maui and of course follow along on all the places you would Twitter X all the places the dev blogs all those things and of course check out the.net YouTube as well if you like this video give it a thumbs up and follow me here for more Donna Maui C sharp.net goodies and again thanks for watching thank you [Music] foreign
Info
Channel: James Montemagno
Views: 35,794
Rating: undefined out of 5
Keywords: .net maui, dotnet maui, dotnetmaui, .net 8, dotnet maui 8, dotnet maui in .net 8, visual studio, dotnet maui upgrade, dotnet maui migration, menu bars .net maui, visual studio code
Id: 3lZldOqg5i0
Channel Id: undefined
Length: 18min 51sec (1131 seconds)
Published: Tue Sep 19 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.