Hmm.
Something seems a little bit different around here.
That's right.
NET 8 for .NET MAUI is here.
Release candidate one just dropped with the 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 .NET
MAUI inside of .NET 8, how to get started, what's new, what's different.
So let's go.
Hey everyone.
I'm James and I'm back today with another video.
This time we are talking about .NET MAUI inside of .NET 8
specifically release candidate one.
Now you might be watching this with release candidate two 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 .NET MAUI.
This means you get all the goodies, right?
All the new C sharp features, all the new .NET 8 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 .NET 6 or .NET 7, it's super easy to get to .NET.
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 .NET MAUI application.
So let's go ahead and get into it.
All right.
Well, let's just first talk about what's in .NET MAUI inside of .NET 8.
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
.NET MAUI, but the underlying platforms of iOS, Android, Mac.
Mac, and of course, Windows, lots of top feedback, uh, 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 has 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 .NET MAUI shifts as 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 NuGet packages for previews.
So you can grab CI builds or different nightly builds or things like
that, which we'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,
uh, input and navigation commands as well.
So we'll take a look at that.
And then lots of goodies in hybrid and the Blazor hybrid web stack with .NET MAUI.
So some new additions there and an experiment that I'm really
excited for that I hope goes into .NET 9 at some point.
And then finally, since you know, NET MAUI apps are native, not only
leveraging those native platforms.
There's a lot of things that we can do in 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 a pain point for developers often,
uh, 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 Xamarin
Forms 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 autofocus scrolling and absolutely no.
Keyboard overlap happening at all.
So you can see the Xamarin.
Forms one is pretty good.
But if we actually go over to the .NET MAUI one, it's super awesome.
Like you can next through everything, everything moves around as you would want.
So you can click off of it.
Uh, 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, uh, 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, 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.
So pretty, I love it.
So you can add those accelerators if you need them.
I talked a little bit about the experiments in a video, so I'll put a
link to that as well, but the hybrid web view 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 that's really cool.
And you can.
Blend and blazer stuff if you wanted to see all that
goodness in there, which is rad.
I talk about native AOT, uh, 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 .NET MAUI .NET MAUI sees.
Huge improvements here.
This is actually from preview six.
So these numbers might even be better by the time GA hits as well, but we're
seeing is size on disc 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 dot net, which we've talked about on the channel before is my favorite
features of .NET seven with native AOT.
Uh, and then also that actual IPA file is, is also greatly reduced.
Same thing for a .NET MAUI iOS application.
You know, this reduces as well, greatly to, you know, 31%,
30 percent 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
.NET MAUI for .NET 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'll
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.
Uh, so you can start to target iOS 17, which is really
great in the, in the betas.
Um, and also he 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 released candidate one.
So I'm on preview to your miles may vary based on when you're watching this video.
Okay.
Uh, but all you need to do is just update.
That's it.
Now, as long as you've gone in and selected .NET MAUI, that's going to
install the release candidate bits and give you everything you need.
So here, NET MAUI, uh, here, app development.
And what you get with that is all of .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 check
box and also get that Xamarin support.
Right.
So that'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 17, seven, four release that I happen to be running.
Uh, 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 .NET 7 where 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 your command line and you can type in .NET version.
And if you get back a version, then you've installed a .NET 8 or whatever you have.
If you haven't installed .NET yet, you're going to go over to the .NET
website, NET, 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 .NET 8 button down the boom.
You're good to go for GA.
Else you're going to see this.
R C so you can click this, get our C 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, uh, Linux over here for your
installers and you'll be good to go.
Now, additionally, uh, you can then.
Install the T eight S D K, and then you're gonna want to install the T Maui workload.
So here, if I do T 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 eight oh 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, uh, over there.
Now, if you don't have any of the .NET MAUI 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, NET Workload Install MAUI.
They'll give you everything that you need right there.
Now I'll link to additional documentation.
If you are going through that, uh, 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 launched 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 .NET six and .NET seven templates.
If I go and I do a dropdown 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 a Maui app five and select next.
Now you can select your framework version.
I have version seven and eight.
So obviously I want to select .NET 8 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, you're.
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.
And 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, five, 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 seven to net eight.
And if you just do that and you just type in net seven and, uh, you replace
that with net eight, 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 want to close all the visual studio,
delete your bin and OBJ file and 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 eight.
Now there are some things for Mac catalyst users, and this is important
because some of the runtime identifiers changed, uh, and specifically you'll
want to note that here it's going to default to X 64, but you can change this
as well and 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 may be 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 OSs 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 and we'll get rid of that
gold bar there, you 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.
Uh, so specifically are two big differences.
One has to do with how the new packaging works for the controls
and compatibility and different, uh, new gets that are installed.
And then additionally, there are some other things for Mac catalyst.
That's right.
More Mac catalyst stuff, specifically how you bundle up your.
Entitlements, uh, P list files here for Mac catalyst.
So there's an AKA 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 heart in runtime.
If you are developing Mac applications, there are different requirements that
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 .NET 8 project and just going into
the CS project and aligning it up.
Um, and I'm hoping that the team will put together a guide somewhere.
And if so, I'll link it into the documentation.
And the biggest thing here is this new identifier, this Maui version.
This is similar to, for example, these build target framework identifiers,
um, that are going on here.
And then the same thing here with, uh, the target frameworks or configurations.
This is a version number that is specified by the current version of .NET.
And .NET MAUI workloads that are installed.
And 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 the .NET MAUI being shipped basically as NuGet
packages, uh, 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 .NET 8 preview.
You scroll down here, you'll see that there are as NuGet packages.
So when they're reviewing pull requests, unrelease experiments, project
versions, you can actually grab details.
Uh, 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 very specific version that you want.
Um, you can also use NuGet 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 .NET 6, so you open
up that Maui program here, you'll notice one difference, which is this.
Uh, 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
of this stuff is going to be for all intents and purposes, exactly the same.
Same thing here.
If you go into your different resources here, if you actually open this up,
we have a resource, a 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 dropdowns 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 Xamarin live preview are here.
So you can get access to all that stuff.
You get the live visual tree, but 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 VS code, you'll be able to deploy it 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 8 for .NET 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 like creating projects, but
obviously upgrade and update your project.
Those really minimal differences in the CS project is really just going in, adding
a few little instances there of the new NuGet packages and then changing nets.
Seven or net six to net eight, 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 new get packages that maybe you're using as well.
If things have upgraded and come along, take a look at all of the release notes.
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 .NET MAUI podcast, and also at .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.
Go to .NET Conf.
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 .NET 8 with .NET 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 liked this video, give it a thumbs up and follow me here for
more .NET MAUI, C sharp, NET goodies.
And again, thanks for watching.