Intro to Visual Studio Code | .NET MAUI Minutes

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] [Applause] hi everybody welcome back to net Maui minutes a new series where we go into the basics of some net Maui things for just a few minutes today I am really excited to show you one of my favorite newer features for Maui which is Maui support and visual studio code I'm matd Monella I'm on the Maui team and we're just going to hop right in and get started with this cool so I'm in a new open Visual Studio code window I'm on my you can see um and I have installed the net Maui extension it is currently in preview I'm also using the pre-release version which we ship updates to every week so if you want to be on the latest and greatest that is an option for you you can switch back to release um and when you install the net Maui uh extension it's going to install the C and the C dev kit extensions for you so the Maui extension you need a visual studio license or subscription but don't worry you can use the community one which is totally free all you have to do is have an account and then log in which activates it and it basically tells the extension that you know you have a license you're allowed to use this stuff um and the community license is free for open source and nonprofit and educational purposes and for businesses that aren't big yet you can Google it for details um but don't worry you don't have to pay for it it is still free so the overview page of this Maui app has all of the information you need to get started um we have down here the learn how to get setup docs or if you want to do Android or iOS specific stuff so I followed both of these um I have xcode installed on my Mac and I have Android SDK I have the latest installed on my Mac as well so all of these are available to me if I didn't have those I wouldn't be able to do do development for those platforms which is fine Maui of course is Android iOS Mac OS and windows so on a Mac you can do Android iOS and Mac OS so let's pop right into into seeing how this works I'm going to go back to this homepage and I don't have anything open yet in this Visual Studio workspace or window so once you have the Maui and C devkit extensions installed you'll get this option create doet project so I'm going to click that it's going to check that I'm signed in and then it'll pop it up here in the command pet I'm going to click Maui app it's going to ask me where I want to put it so I'll go into my source folder which is where I keep as you can see all of my demo apps um I'm going to name this one Maui minutes I'm going to great cool then I'm going to hit open so it knows to put the uh new project in there it's going to ask me what I want to name my app Maui app 1 is perfectly fine by me hit enter and it creates it for me right away um I can also create a Maui app on the command line so if you open the terminal you could do net new Maui I'm not going to do that because it will create another app right here but you can always see all the different net templates available to you with net new list list so got a a bunch of Razor ones um specific Mac ones and then if I go way to the top I see that net Maui so let me close out of that so we have some space back um this is the regular file explorer and vs code right here but I'm not going to use this I'm going to minimize it and I'm going to use the solution explorer that c devkit brings in and basically it just tells VSS code how to read a solution file like you would in visual studio so it says this is a solution called Mali minutes and um in it has a project Maui app one which is the Maui app we just made and these are all the files you can see my examl files have the C files nested under them which is really nice just like it would in the solution Explorer in visual studio so if I open this zaml page here um I get or a c page either or I get these two squiggles next to the word zaml um in the bottom right and that is your debug Target selector for Maui so this comes in with the net Maui extension if you were just doing like an asp net project it would obviously deploy to your browser um or to your console if it's a console project but with the Maui extension we give you the option to change where you're debugging it to to whatever you have set up so like I said I have xcode and I have Android installed so it will pop up with my Mac locally all of the simulators that xcode brings in and then the Android emulator I have set up on my machine but we're going to do the Mac because that is super fast Pro tip with this menu by the way cool you can pin these things so if you're switching between devices all the time um you can just click that you don't have to wait to hover over this or select this so let's run this we go to the run debug thing on the side you can also just hit F5 click that um if it asks you for a debugger you want to choose the net Maui debugger at the time of this video in the future the net Maui debugger will be going away it will just be the C debugger just a heads up but um depending on the version you're on it might still be net Maui and it might be C if you see a net Maui debugger just choose that one if you don't C use C just like that it's going to build and run um something cool that I just found out the other day is you can actually move this little debug bar it's usually centered but if you have a ton of files open it blocks the files you can just grab it and move it fun fact we're all learning Visual Studio code together all of us Maui developers um and then it just built in ran my app you saw it pop up already but that's it it's a Mac Catalyst app nothing too f by file new um once again this is all available in the documentation we have a Blog we have docs it's in the getting started docs from Mai how to use vs code there's also a walkthrough in visual studio so if you do control shift click out of that command shift p on a Mac or control shift p on Windows and you search walkth through you can hit open walkthrough and it shows all the walkthroughs for your extensions we have get started with net Maui and it walks you through it just like that how to set up your environment all of these things so check out the docs check out the walkthr please submit your feedback all of the issues for this are in the GitHub um and if you go to help report a problem in Visual Studio code it will take you right there uh and I hope you enjoyed this net Maui minute and we'll see you at the next [Music] [Applause] one
Info
Channel: dotnet
Views: 9,711
Rating: undefined out of 5
Keywords: .NET
Id: sC2yYhEblcQ
Channel Id: undefined
Length: 6min 26sec (386 seconds)
Published: Fri Jan 05 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.