 All right. We have Maddie. Maddie Leger is here and you're going to show us Xamarin, so productivity in Xamarin. I am, yes. Awesome. So whenever you are ready. Great. Yeah, so I'm Maddie Leger. I am a program manager on Xamarin. I work on tooling and most specifically Xamarin forms tooling. But what I'm going to show you today are across your whole development lifecycle, a bunch of different ways that you can boost your productivity when making your Xamarin forms and Xamarin apps. So I'm going to share my screen. We're going to do some slides real quick. I only have a few, I only have what 30 minutes. So have a bunch of things to get through. And then we'll do a demo of some stuff towards the end, give you some links, close out my face on top. Oh, minimize that. Bye. Okay. And then hit present. Okay. Is this good? Channel 9? All good? Yeah. I want to take that as a yes. I haven't heard of anything otherwise. So great. So well, boosting your Xamarin development productivity. Like I said, I'm Maddie. We're going to jump right into it. If you have not heard of Xamarin before, Xamarin is Microsoft's open source app platform for building apps for any kind of mobile or watch or TV that you can imagine using .NET. So you use C-Sharp. You use all the familiar tools and things that you are used to, but you also get 100% native access, native API access to those platforms. So if you're building an iOS app using Xamarin iOS and you want to use the latest and greatest features like dark mode and all that, you have all the ability and capabilities to do that using C-Sharp. So you don't have to go into Swift or Objective-C ever. So the architecture of a Xamarin app, if you haven't seen this slide before, is basically you have all the projects for your .NET project where you can share your C-Sharp code, your Android and your iOS and your watch and whatever projects. And then you have a whole bunch of shared C-Sharp, your shared business logic, your shared APIs using Xamarin Essentials to do things like turn on your flashlight and turn on or use the accelerometer. And then if you're using Xamarin Forms, you can share all your XAMLA UI. And then you still have these three iOS, Android and your UWP or watch or whatever other projects you have in there to drill down into that native code. So they're super high performance. Like I said, you get all the native API access that you need so you never have to go into a different language if you don't want to. You can do everything that you could do with native mobile using C-Sharp. So let's jump into what we're going to talk about today. Which is ways to boost your productivity when you're using Xamarin or Xamarin Forms. So, you know, Visual Studio for Mac, Visual Studio for Windows, that was the big splash early this week is we shipped 16.3 on Windows and 8.3 on Mac, which both include some great updates for Xamarin developers and your productivities, as well as like the whole 16.0 and 8.0. So the 2019 series has been super, super focused from the tooling teams in Xamarin on making these four steps of your life easier. So when you're coding, when you're building your app and then deploying that app onto your simulator or your emulator or your device, and then, you know, increasing the speed with which you iterate. So whether that's your UI or your actual code or your business logic, we want to make all of these steps faster. So first and foremost, the thing that you do every day as a developer is you're going to be writing code and things that we wanted to do on both Windows and Mac were increase the speed with which you could write code and the accuracy and the confidence and get rid of as many typos as possible. So one of the things that we brought over was IntelliCode support from the IntelliCode team in Visual Studio for Windows. They were able to make IntelliCode work with Xamarin Forms XAML, which was fantastic. So if you aren't familiar with IntelliCode, it basically, you can see these little stars here. It predicts what you're going to type using a huge data set of similar projects. So if you're doing UWP or WPF in your C sharp or in your XAML, it's going to tell you what it thinks you should type next. It'll tell you the properties that most people type when they open a button tag and likewise with new tags or new layouts. So it works out of the box with Xamarin Forms XAML and we're also working on bringing it over for Android XML for Xamarin Android projects, which will hopefully really increase your UI coding speed and it does already work with C sharp for all your different projects, which is fantastic. On the Mac side, we've done a bunch of different pieces of work to bring together the experience between Visual Studio for Windows. So what you expect from your IntelliSense there and your refactorings and your quick actions and bring those over to Mac. And the first thing we did came out in, I believe, 8.1 and it was a brand new optimized code editor. So the brains of it are shared with Windows. So what that means is these things like multi-carat editing and your quick actions and being able to do things with right-click for each to link, all of that. Great stuff that the Visual Studio for Windows team editor team did. Those all came over using the same brains and logic. But we also rebuilt the editor surface itself so that it's super fast, super native, very fluid. You get right-to-left tech support. You get different language support and you get emoji support, all important things. And so once we brought over the code and the C sharp editor, we then set our sites on the XAML editor. And using the same method, so sharing the brains but having this native super fast editor, we were able to bring over the XAML IntelliSense engine from Windows. So now right out of the box with Visual Studio for Mac, you're going to get really, really rich IntelliSense with your XAML. So auto-completion and things like fuzzy matching and substring matching and things that you'd expect from your IntelliSense on Windows. All the auto-complete, light bulbs, refactorings, resource completion, namespace completion, the list goes on and on. So as always, you can check the Xamarin blogs for details on all of these things. These are all in Visual Studio for Mac, the code and XAML editors in the stable today. It's been there since 8.2. So hopefully you've been using them for a while. So another thing that we've been working on separate from the XAML and C sharp side is the Android XML experience. So there's a lot of stuff going on in this world. I highly recommend you go and watch John Douglas' talk from last night. He went into depth on a bunch of the improvements that are going on from the Android SDK and tooling worlds. So go back and watch that. I'm not going to get too much into it today because he did a really good job covering it last night. But this is just a sneak peek of some of the great things going on, like layout linting and new IntelliSense and light bulbs and great stuff with the XML world. Great. So you're coding faster than ever. You're super accurate. Your IntelliCode is writing all your code for you. You don't even have to think anymore. It makes it super easy. The next thing you have to do is build your app. And we always, always, always are looking at ways to make building faster because it is something you have to do every time you want to validate a change you make. So if we can save you a couple seconds every day, you might be making less cups of coffee while you're waiting for your builds to finish. But we're going to make you a much more productive developer. So using one of our reference apps that you can grab on GitHub, it's called Smart Hotel 360. It's a huge app. It has a bunch of dependencies. It uses custom controls. It's got a really intense UI and lots of pages. We use this as a benchmark to test a whole bunch of different improvements we did to our build system, specifically for Android because we wanted to target that first. And we are excited to share these results from Visual Studio 2019. And these are a couple months back, the 16.0 figures, but it's continued to get better and better since we shipped Visual Studio 2019 16.0 and 8.0 in April, April. So you can see here like the times for first builds, incremental builds and deploys have gone way down. And that hopefully saves you a lot of time every single day. So we did a performance challenge with all the different improvements you can make to your Android app and make your builds faster and your deployments faster and all that great stuff. So definitely check that out. That is also on our blog. It's also on the GitHub. I think it's on John Douglas' GitHub. And I'm sure he's also talked about it in his talk last night. So check that back out. So that's building faster, which is a huge part of what you do every day. And then you build it. You hit play in Visual Studio and you have to deploy your code to your device or your emulator or your simulator. So deploy is actually kind of a two-fold problem because A, you want to deploy things faster and you want to make sure that you can debug as quickly as possible. But you also don't want to be giving your end users and your customers a huge app. So it's a tricky problem we've been working on solving in a couple different ways. One of the first things that we did was called startup tracing. And the idea with this is that there are some things we don't need to redo every single time you deploy. And we can actually ahead of time compile some of the code in your app. Not all of it because that makes your app size huge, but some of it to give you a much faster startup time. So you can see what these stats here. When you do regular AOT, so you compile everything ahead of time, you save over a second in your startup speed, but you also double your app size, which is really bad. With Profiled AOT, which we call startup tracing, so we looked at the things that we can AOT for you that aren't going to make your app huge. It's only a four megabyte increase in the sample app, but you still save over a second there with your startup speed. So it's much faster. And the best part about startup tracing, all you have to do is tick a checkbox to turn it on. So go into your Android build settings, enable startup tracing, boom, done. Faster and not that much of an increase in your APK. So another thing we're doing with deployments, and this is more on that size side of things, is something called Android app bundles. And Android built this functionality in recently, it came out a couple of months ago, but a bunch of talk about it. But basically, the way Android traditionally worked is they downloaded everything you could ever need when it came to languages and screen sizes and all of that, and that's why your Android apps were huge. But what you can do now is very easily use something called an Android app bundle, which will download only what your device needs. So if I have specific languages that I use and I have one resolution on my device and one type of processor, that is the APK that my phone will download for me. And we have support for this now in Visual Studio 16.3 and 8.3. So go ahead and try it out, and this is also part of that Android size and performance challenge. So you can see people's results with that right away as well. On the Xamarin blog. All right, so let's see how we're doing on time. Oh, plenty of time, good. So now you are coding faster than ever, you're building faster than ever, you're deploying faster, and you have smaller apps, which is great. Then you want to iterate on things. And something that we know folks tweak the most is UIs. So you're pushing pixels, you want to make sure that button is just a little bit bigger, something's off-center and you have to fix it. But waiting for those builds and deploys for just a small, like one line XAML change can be really painful. And that is where XAML Hot Reload for Xamarin Forms came from. And so we announced this back in July as a private preview at Xamarin Developer Summit. You can watch that whole announcement on the Xamarin Developers YouTube. But we are excited that in Visual Studio 16.3, this is built right in. There's no setup, there's no private preview, there's no, you know, like anything you have to do or sign in or anything. You can go in and I'll show you how to do it and take a checkbox and you can start using XAML Hot Reload for Xamarin Forms. So the feature itself is still in preview, which means that there are still things that are going to change and there are still things we know we need to work on, but we wanted to build it into Visual Studio so you can start using it right away and not have to do anything weird and give us your feedback so we can make it better and push it to be a stable feature as soon as possible. So like I said, you can get it with 16.3 or 8.3 today. I'll show you how to turn it on in just a minute. But some of the key points for XAML Hot Reload for Xamarin Forms are that it's just running your app. So if you haven't heard of a hot reload before, the idea of it is that you deploy your app, you change your XAML, you change your UI in whatever language that is and if you're using something else, you hit save and then your app quickly refreshes just the page you're working on. And it saves your navigation, it saves your view model, and you can just see what that change is going to look like, super quick feedback. And what we did with our hot reload is we made sure it was really smart, it was really resilient, it leveraged the amazing tools you have inside of Visual Studio like your IntelliSense. It works with your custom controls and your third-party libraries and frameworks. It works with all the great new Xamarin Forms features. And it works on your Android or iOS emulators, simulators, and devices. So anywhere that you're going to be deploying your Xamarin apps, you're going to be using XAML Hot Reload. You can be using Xamarin Hot Reload. So let's take a look at how it works. So, I'm going to close out of my PowerPoint. Hopefully this is working fine. No Skype notifications, which means I hope everyone heard me okay. I'm going to open my Visual Studio and here I am. I am in James Montemagno's Monkeys app. So there's a couple reasons I like using this app as a demo. One is it has a custom controls and a lot of other things, but I haven't changed anything except for I updated Xamarin Forms. So Xamarin, Xamarin Hot Reload does require Xamarin Forms 4.1. If you want to learn more about why we have a good blog post about like the somewhat of the architecture of it, you can go see that on the Xamarin blog. But if you're not on Xamarin Forms 4.1 yet, it's 4.2 is the stable now. You have no excuses. Go upgrade. It's great. Lots of new features in Xamarin Forms. So I upgraded that. So what I want you to start using Xamarin Hot Reload is go to Visual Studio Preferences and if you are on Windows, I know I'm on Mac, you can go to Tools, Options, and then Xamarin Hot Reload. And Mac, it is Visual Studio Preferences, Projects, Xamarin Hot Reload. And then click this checkbox, Enable Xamarin Hot Reload. So then I'm going to hit play, start debugging. I already have my emulator up. You can see I'm on iOS 13. So fingers crossed because I'll know the update craziness. You never know what breaks. But it was working earlier. So it's going to build my project. It's going to start spinning up all my Hot Reload assemblies. And boop, boop, boop. Take its time. Nothing in the output. Okay, it's thinking. That's successful. Okay. So Hot Reload is nice enough to tell me that James had his linker on. So I can go ahead and it's still going to launch my app. It's not going to throw up everywhere, but it's not going to work yet. So let's close out of this. Stop debugging. And then I'm going to open my build settings with this little button. And James has it on link frameworks SDKs only. So you're going to set it to don't link. Right there. So definitely I've had some questions about this from the private preview. Why do I have to try out my linker? Well, first of all, you shouldn't have your linker on in your debug builds because it's going to make your build slower. So that's why I'm going to call it SDK smaller or your app. If you're using the iPhone itself, like a physical iPhone, you want to put in the additional mTouch arguments dash dash interpreter. And that tells your iPhone, your physical device, it's okay for Visual Studio to spit code back at your device and make it refresh it. Otherwise, Apple doesn't like when you do that. But that's how Hot Reload works. It just sends more code to your device. So you don't need that for the simulator, it just sends more code to your device. Okay, let's try this again. Hit play. Boop, boop, boop. Build successful. Great. So it spins right up and... Oh, encountered a problem. What did it do? Okay, let's try this. Quit that. Quit that. And we'll restart Visual Studio. Classic. It's a preview feature, but it has been tested with all of the latest bits that we shipped out. So your iOS 13 and Xcode 11 and your Catalina, it does work with, which is awesome. And then we'll just go back into Visual Studio. Sometimes you need to do like a good old bin-obj delete, but this should spin right up for us. And I'll double check that my linker settings, I set those right. And I deleted interpreter. Yep. Got my supported architectures. Boop, boop, boop. Let's take it at the time. I'll minimize that. Make sure my Xamarin.Forms version is good. Yep. Let's do its full build all over again. Alright, there we go. Connecting. Launching. Oh no, what's going on? Uh-oh. Alright, let's try updating my Xamarin.Forms one more time. If you haven't seen the new solution level Mac NuGet Package Manager, it's fantastic by the way. So I can go to Manage NuGet Packages. For my whole solution now, check my Xamarin.Forms. Latest stable, good. Add package. Select all my packages. Make sure we're doing good on time. Close that out. And we'll do a full rebuild and hope that works. If not, we'll switch to another project and see if that one's working. Okay, rebuild all. Let it clean. Let it build. Do-do-do. Double check my build settings one last time while we wait this, let this happen. Yep. Yep, yep, yep. This is when I would go make a cup of coffee if I was a Xamarin developer. But I'm sure that I'm getting a bunch of messages and clear bin options. So let me check that too while we're here. Reveal and finder. Oh, we'll let that build and see. Play. Connect. Let's go. And... Yay! Okay, great. A classic rebuild does the trick every time and hopefully I don't run too short on time but we still have a few minutes, which is good. So, we are in, like I said, James's Monkeys app, which is awesome. You can do a list of monkeys. This, like I said, was Xamarin Reloaded. It's just running your app. So, literally, I can click in and go to my different pages. I can pull it down and scroll around just like I would. If I was on device, I could be using my device and screen mirroring it or not, and it would work great. So, the first thing I can do is I can go ahead and start switching up my bindings. So, change location and change name. So now this should say Africa and Asia up top on the bottom, which is great, exactly what I wanted. And you can see how instantly that refreshes. So, I can switch it back, hit save, good to go. James has this amazing Circle Image Custom Control and it's pulled in through Nougat. It's right here. Oh, didn't mean to double click that. What? You don't have focus? Is something blurry? Okay, I don't know, I just heard something. But I can change the color of this to blue. Hit save. Channel 9. Hi, Jamie. So, okay, yeah. So, I'm going out, I'm changing the border color. I'm changing the border thickness. My custom controls update right away. I can go into like this page. So, I'll, I can click on, let's go to this golden lion. And like I said, it does hold your navigation and your view model. So, what James did here was he found his view model in the code behind. So, I'm going to hit save here, which means that when I hit save and it refreshes my XAML page, it's not going to try and reload my view model every time. So, if I go into the details page here, which is this page I'm on right now, I can do things like change the location and the name and change my border color, change my border thickness to 23 and hit save and all of those things are going to get updated right away So, that's kind of the basics. Let's go into a shell app as well. So, I'm going to stop debugging that, open another Visual Studio, and hopefully this one's in a good mood too. Doot, doot, doot. Might have to binob this one as well, but we'll see. Hit play. And so, if you didn't see David Ortina's talk on Monday, afternoon or morning, Pacific time maybe, that is all on demand right now. You can go see it on the YouTube and the Twitch, but he went into depth about all the great things you can do with shell. So, if you haven't heard of shell before, it's basically a way to describe the visual hierarchy of your app in one file. So, you'll see the exact same app we were just looking at, sort of, with a browse and a list view. But this one also has the about page, they're all described as these tabs right here. And I want to show in this app some of the other great features you can do with hot reload. So, one of them is being able to change all your resources. So, I wanted to change the color on this about page of this button. I'll hit save. It's immediately going to refresh and change that static resource up here, which is down all the bottom of the page in this button. Now, if I wanted to move these resources while I'm running my app to my app.xaml resource dictionary or merge resource dictionary somewhere, I can cut it and hit save. Now, hot reload doesn't know where those resources are anymore. It doesn't crash the app. Instead, it just uses IntelliSense and that great new XAML editor on Mac to tell me that it doesn't know where that static resource is anymore. And then it just takes out the things it doesn't know what to do with. So, the SAC layout is still there. It just took out the background color because it doesn't know where to find it. So, I will go drop these in my app resources, hit save. Because I just edited an app level file, it's going to take me back but if I go back into my about page, all my resources are back there. And I can go ahead and change this to something like Fuchsia, which I can never spell right. And hit save. It's going to bounce me back to the top, navigate right back, right there. And then I can go ahead and change where this is referencing it from. So, if I wanted to change my background color to primary two and hit save, well, there we go. Perfect. You can see the IntelliSense pops away when it realizes that resource is gone. Additionally, I can go into my shell and start editing things there as well. So, if I wanted to change the actual primary navigation color of my app, so let's make this lime. This is going to start being a really ugly app in just a second. It pops back to the top because it's an app level file, app shell. But it's going to change my color right there. So, let's change it to black so you can see those tabs a little bit better. And then I can go ahead and do something like paste this tab a couple times, hit save, and see them immediately pop up. And because shell is handling my navigation for me and because this is using content templates and the data template for AboutPage, the navigation already works and this is all just editing my XAML. So, super easy. Again, it's resilient. So, let's say that I misspelled the color black because I'm really tired. It's just going to get rid of that color for me. It's going to highlight it and it's going to tell me it doesn't know what that color is. So, that's kind of the nitty gritty of getting up and running with hot reload and seeing all the different features it has. Like I said, it's a preview feature. So, definitely report problems on help report a problem right here or help send feedback or report a problem on Windows. Let us know what other features you want. For sure. So, let's pop back into the sides real quick. I only have two more slides. One is a bunch of links. So, I should have linked to all of the amazing already existing Xamarin talks, but you can find them all from the page that you're on to watch this right now. So, do that. Additionally, you can learn more about hot reload in the public preview at aka.ms slash XAML hot reload. You can learn about the docs at XAML hot reload docs and that's where you will find all the things I showed you about how to set it up and some of the features you can do with it. And then if you want to go check out James's app, there's the GitHub right here as well. There's one more session on Xamarin.net Conf. It's tonight. It's Mixed Reality with Xamarin Azure Spatial Anchors, which is an amazing talk. It's by Swicky, so definitely go watch it if you are around at that time. And that's it. So, hopefully we have time for a question or two. I know there was some demo issues, but I'd love to get your questions and as always, feel free to tweet me or email me at MattyLizzer1 and I can get back to you. So, let me stop sharing my screen and then we can do some questions hopefully. There were a bunch of questions, but James answered them all. Oh, wow. We're in there just hashing away at them, so feel free to shoot any questions to us now if you have any directly from Matty. James and Pierce are in the channel answering them as well. Hi. Fantastic presentation. Hi. Yeah, sorry for the interruption there. Do you mind closing your screen so we stop getting the screen section? Oh, is that what's going on? Yes. I stopped sharing it, but it's still showing my face. It's all there. Weird. All right. Well, cool. Thank you, everyone. Well, thank you so much. All right. You can watch Swicky's channel later at FourEastern, right? Yes. All right. So we're going to switch over to Elton and thanks, Matty. Bye. Thanks, bye.