 Now, let me grab my paper here because I want to get the title correctly. To the Cloud with Visual Studio in Azure, we have Andrew and Paul. Why don't you get us started, my friends? Thanks, Seth. So my name is Andrew Hall. I'm a Program Manager who works on.NET and Azure Tooling. I'm Paul Yuknovich. I'm also a Program Manager working with Andrew, my twin brother. Yeah. Little known fact. Yeah. So as Seth introduced, we're to the Cloud with Visual Studio in Azure. We want to spend most of our time today looking at the product until we get to questions. But first thing we want to talk about is Visual Studio makes it really easy to get started with Azure. We offer multiple templates for creating projects. So no matter what you want to do in Azure and the Cloud, we generally have a nice template to get you started to build that type of application. Whether it's working with our first party proprietary stuff, such as Azure Functions, whether it's general purpose ASP.NET core applications that are really the workhorse of any modern Cloud application you want to do or working with third party technologies such as wanting to dockerize it, put it in docker containers, and potentially put that up into Kubernetes or another host for containers. That's really caught on this year. So I'm glad we're doing that. Yeah. One of the other things that we've worked really hard at is to provide great offline experiences for common developer tasks. So if you're not in a place where you're ready, or willing, or interested to actually take the leap and run stuff in Azure yet, a lot of common tasks that you can build a lot of good applications on your local machine with just the offline emulators that we offer for Azure and for some of the other services. So you want to develop on an airplane, you want to develop at a coffee shop, but don't really trust public Wi-Fi. Yeah. We can help you there as well. Even though it's a little bit ironic, we see a lot of customers are saying, hey, there's times I just want to work locally. It's fast. I have everything set up on my machine. There's other times I want production realism, so I'll run in the Cloud. We see that continuum where you want to go back and forth. Exactly. So with that, let's jump in and look at some of that brand new product we just shipped today. Sweet. All right. So we're going to start off here in Visual Studio 2019, and I should start off the launching into the great new project experience that was shipped in Visual Studio. So I have filters up here. So if I'm interested in project type, I could choose Cloud and I'm going to see project types that are associated with Cloud, for example. I can clear that filter. Once I go into, I mentioned some of the other technologies we integrate with, for example, I want to do an ASP.NET Core Web application hypothetically. For the purpose of this, I can choose Create and I'm going to see options right here at the new project creation experience to enable Docker support. If I want to do that, of course, I can always add that to an existing project after the fact as well. Right. Because a lot of people like to do that as a part of the DevOps pipeline. Exactly. So I'm going to go ahead and back out. We're going to go ahead and open an existing project that we have for the purposes of our talk today, and we'll make this available at the end in our slides. So what I'm going to have here, Paul, I know that you and I are angling to get rich with our newest startup. Yes. That's taken us an awfully long time. It is. Penny's at a time. That's right. But a penny saved is a penny earned. So what this application is going to ultimately be, it's going to be a photo gallery application. So we're going to have an ASP.NET Core project that we're going to run. It's going to serve up the images, it's going to use upload images, and then we want to introduce an Azure Function application into that project. For those who aren't familiar with Azure Functions yet, they're event-driven serverless programming. Serverless doesn't mean that I don't have any servers executing my code. We're not actually magic yet, as much as we'd like to be. But what it does means as a user, I don't have to care about reserving resources for my application. Serverless means that the Cloud is going to take care of scaling up as many instances as it needs to handle incoming requests. It's going to spin it down. From a cost perspective, I'm only going to pay for the CPU cycles and memory that I'm using to execute those functions. So no incoming requests, no events causing those functions to trigger, and I'm not going to pay for those. It's the most managed service possible. Exactly. It's completely managed by us. Yeah. We had a great blog post by one of our CDAs, Jeremy Lickness, about a year ago where he talked about, he'd written his own service that he was using for all his own URL redirection. I think it was costing him 20 cents a month for thousands and thousands of requests every month. So with that, let's talk about functions. I think they're one of the cool new technologies in the Cloud space. If I wanted to create a function project, we talked about how we would create one. But I mentioned they're event-driven. So let's go ahead and start my functions. Let's go ahead and start debugging. What we want to do here is, if I find the set of startup, that'll be easy enough. All right. Hit F5. This is going to spin up the Azure Functions Runtime locally. I have no actual Cloud connection currently. I'm going to be working with the Azure Storage Emulator. So I'm going to be building an event-driven, modern Cloud application, and entirely my local machine without even at this point the need for an Azure subscription. All this is freely available. You said event-driven. What events do we care about here? So in this case, what we're going to do, I mentioned we have a photo gallery app. Yeah. We want to make sure that nobody steals our great idea, Paul. Yes. Nobody steals our images. Because it's never been done. Never been done. Never been done before at all. So what we've done is I've written a little code that's going to stamp a watermark in, so people make sure that they know that this image came from our photo gallery. So how this should work is a user should upload an image to our site. Yeah. Then it should stamp a, the function should pick up that image stamp a watermark in it, and put it back in the place that the site can serve those images up. So I'm going to go, I have here my local Azure Functions. Kind of a good example of just a worker pattern, right? You want the front end to be as thin as possible, let the back end do the heavy lifting. That's correct. Yeah. So we have our function up and running. You can see that I have a local development experience just like I would expect in Visual Studio. So I have breakpoints, I'm able to hit F5, it's launching, all the codes running here. No Cloud connection required. So let's go ahead and fire up our another application here, which would be our core image gallery, and debug, we'll say start new instance. So when this launches, you'll see my photo gallery come up, and what should happen is when I upload an image into my blob storage, I'm going to expect that this image uploaded function is actually going to get triggered. Notice we haven't hit it yet, even though I can see my functions up here in running in Visual Studio. So as soon as my browser, Even with cool ASCII art. Even with cool ASCII art. Yeah. It's correct. All right. So we can launch two of them at a time. So once this- You never know what's going to happen with MSN. You never know what's going to happen with MSN. That is very true. It's a fun website. All right. So let's go ahead and log myself in here. Anybody has any comments, questions or complaints? There's my e-mail address. I forgot to check their memory checkbox again, Paul. All right. So now I can upload an image. I'm going to pick an image off of here. Have these nice wallpaper images. So that basically queued up the blob. They queued up the blob. That's correct. If I put it in the right place, everything would work as I would expect. So just to illustrate this working like I would expect here, when I have my local emulator, what I want to show is I want to show just uploading an image unlike the way that the application works. So we can see back here on my gallery page that we have an image. When I zoom in, if I go down here, very tiny we have our little water marks. Last time we did this, people didn't believe us. We have to work on that today. That's right. We aren't accounting for the scale correctly. But now let's see what happens if I upload an image here. Upload, upload files. Let's pick another image just to use storage explorer. First, if I want to test my function like this, I can. I can go beautiful, boom. I click upload and it's going to upload real quick. Then for some reason, let me make sure I have my connection strings correctly. Oh, I stopped debugging. I somehow stopped debugging. That is why my breakpoint is not hit. It helps with the function's running. It does help with the function's running. I'm not sure totally how that happened, but you have to learn the lifetime to master. That's right. Now, what I'm going to expect that my function is actually running, is my breakpoint hits. So I can step through. I can see that I have functions have automatically passed in my information. I can see the name of the file. So it's as beautiful as streams wallpaper. So full local debugging experience. I have a second function that I've added here, which is going to go on delete the honor watermark copy. So I can step through this as I would expect as a user. Hit F5, F5, boom, it's uploaded. I come into my function to delete the unwatermarked copy. F5, there's two of them since we accidentally stopped the function from running. Perfect. And so great offline development experience just with our modern cloud tools here in Visual Studio. Yep. So once I've done that, I have my application, let's do multi startup project here. Launch both of them. Just make sure that it starts like I want. So we can start both of them. That's a good trick for any distributed app. Yep, good trick for any distributed app. We can even containerized workloads. Exactly. So I can start multiple applications like this. It's not, oh, I accidentally picked the wrong project. That helps if you're just testing Visual Studio. I was just testing Visual Studio. That's correct. All right, start. Start. Okay. Boom. Boom. And so those are just separate disconnected processes, but they know how to connect through the connection string. That is correct, yeah. So the only thing that ties these two particular applications together at this point is the storage account at the moment. The storage account, yep. And so I can see that I have the two images that I uploaded are currently present in my site. So let's say I'm ready to run this up in the cloud now, Paul. And I have an operations team that's gonna take care of a lot of stuff for me, but I'm a developer. I like the tech. AKA me. AKA you, yes. But I like to take care of my stuff previously first. So the way I can easily test this in Azure is I right-click publish here in Visual Studio. Pops up. I have the ability to create new services in Azure. So a new Azure app service. This would be an easy thing for me to do if I wanted. Yep. Yeah, this isn't the official deployment process. This is like the quick way to try it out. Exactly. Now it so happens, as you mentioned, because you're my ops team, that would be it. I'd click create and boom. I'd be up and running. I'd have it running up in the cloud. But it turns out you're my operations team. I've already created something for me in Azure. Right. So I can choose the existing app service that you provision. So if you work in an organization where somebody creates the resources for the team, whether it be operations, or just a particular member of the team, we've really optimized to make sure that work with selecting existing resources works just as well. Yeah, I'm glad you're doing that. Because we've had this feedback a lot, that just there are pre-existing resources and you really need to bind to them right down to the environment variables, right? Yep. So just leverage what other people have done. And so now, this particular application uses a SQL server to let me log in to keep the user account information. Also uses a storage account. Yep. And if I didn't have those, I have the ability now, after I publish the application or once I've selected an existing one, to go then add Azure Storage and Azure SQL Database to that application directly from Visual Studio. Yep. So again, for my own development purposes, we try to take all the common services that you would need and just make it really easy for you to do that directly from Visual Studio without. And to your last point, you can bind to existing ones too. So. Yes, exactly. So that's gonna be a theme throughout everything we show. Exactly, yeah. Either create or select existing, both services completely support that. And so in fact, in this particular case, for example, you've already created an Azure SQL Database for us. I've decided you need some rails, sir. Thank you, I appreciate that. Paul doesn't actually trust me. This is his personal subscription. So he turns out he likes paying his mortgage and doesn't want to be creating stuff. There was that 1,000 VM incident that I'm still recovering from, so yes. All right, great. So yeah, just to kind of briefly review where we ended that, we've also not only made it really easy to get started by having project templates and all the tools that you'd want to do local development, we've also tried to make it really easy to test your applications in Azure before you would hand that over to operations team or push that into production. And we showed a couple of the publish and provision capabilities that we've added to Visual Studio and we also have some really great diagnostic integration that I think you're gonna show us here in one minute. And the last thing that I didn't show but it's worth mentioning is we have really great interaction with Azure DevOps. So if you wanna set up a CI CD pipelines, use Azure DevOps to actually deploy and build as part of a continuous delivery, continuous integration workflow, that's all just native into Visual Studio as well. And with that, why don't you tell me how I fix things once I actually break them in the cloud. Well said. Okay, so the first thing where I picked up where Andrew left off is I've defined actually all the infrastructure that we need for this application but I've defined it using what we call an ARM template, ARM meaning Azure Resource Manager. And so that's a bit of JSON that's up on our website so you can just go grab it. And once we deploy that with a one-liner, you can see that all of our resources are created up in a resource group. So this is kind of like our namespace to work on. And at that point, this gives me a good separation really between ops concerns and the dev concerns. Like I can work on this, I can secure it, I can make it work the way I want and then you can freely use it, right? These are your resources to use. So a few things that I wanna drill on on. I have a web app and I have the functions to handle the backend. And the web app, at this point, you can completely configure for scale, right, I can scale it up to use better hardware. Or what I recommend more is you would scale it out, have more virtual instances that you can use. Then most people wanna do things like set up SSL and set up better networking. But with that said, what I really wanna do at this point is I wanna look at the health of my application. And the really cool thing is apps that we make with Visual Studio by default and then apps using the pattern that I've shown this ARM template, they're gonna be immediately monitorable and diagnosable. So we basically set up Azure monitoring, we set up observability, and we set up the deep diagnostics. So let's check that out. So I can see in my web app, I am getting metrics. And what we really see is that metrics and logs are at the heart of all diagnostics, all monitoring in the cloud. So we've really kind of embraced that with our tooling and with our services. And so we can take a deeper look at our application monitoring. So I have my failures, my healthy requests, my response times for performance, and my 100% uptime, which I'm very happy about. All right, rock solid code. You do. Well, let's put that to the test, sir. So one thing that I always recommend doing is just take a look at this application map in monitoring because what we can do is inspect really at runtime with the topology of your application is and all the different kinds of requests. We can trace those transactions across tiers. And don't you know it's a busy day probably on this local network? That's okay. Yeah, we have a few, one or two things going on today. Yeah, we do. Around here on campus. Okay, well. Especially in this building. So some other things just, well, we're doing that. I mentioned that, you know, really your trace and your logs are at the heart of things. So all of that trace, all of those logs are coming in. And we can do some extra special things because again, we set up monitoring and .NET apps really work better on Azure because we automatically emit a lot of trace, a lot of monitoring events. You're seeing things like dependencies, requests and availability just being fired as a part of the trace. And when I go to failures, this gives me both just the actual list of failures but it's actually doing some aggregate analysis. Like what are my top exception types? What are the top response codes over time? And so we do in fact, I mean, it's part of life but we are seeing exceptions and we're seeing responses. The one that is a little bit more opaque to me would be this null reference exception. That's always something I think we cringe at when those come in. So let's take a look at those. So we're seeing here, we call this an end-to-end transaction view in Azure but really we're looking at all the HTTP layers of your application and tracing all the successful calls down to the point where there's a failure. And here we're saying that the 500 is attributable to a lower level exception. And as you'd expect, it's a null reference exception. And I can tell from the call stack that this has something to do with your uploading code but that's really not a whole lot to go on. Like any working theories on what that could be? Um, upload. I mean, we do try to collect some information about the file to record a record in our database. Maybe some records being left null in some cases. It's a good one. So maybe we'll take a couple hours and go see if you can find that. Yeah, clearly it worked on my machine. So, you know, to cut to the chase, cool thing is you've seen earlier today we have a snapshot to bugger in Visual Studio but we've also brought that to the cloud. So you can click on, for any exception that's being monitored, we create these debug snapshots. They're kind of like dumps, dump files in the cloud. And then the really neat thing is I'm actually gonna get the local variables for each frame. And if I go to the username, the most suspicious thing I'm seeing is that like we're getting exceptions on these uploads with no user, which is totally wacky. Yeah, that is really strange. You shouldn't be able to upload a file if you're not logged in as a user. Right, so let's test that. Right, so if we upload an image on our site, I really like engines, by the way, in case you didn't notice. So, cool, that looks good. And, that's a no repro. Well, yeah, but we were seeing no user information. So what if you try to log in now? Okay, so I just tried that. So, as you can see, nobody's logged in. Let's give that a shot. And, let's upload some fish this time. I like fish too. There we go. So, some of our users are getting this error and it's just one of those cases we probably haven't thought of. And, we see this a lot in the cloud. Things work in your lab, in your testing, but once you get real customer input, everything changes. Yeah, I just check the remember me check box when I signed in. Really, we shouldn't be letting people upload images that they haven't registered for an account and aren't authenticated. Yeah, it's pretty wacky, right? And, there's some other places you can play even beyond here. We talked about failures and health, but what I also wanna do is get to the point where I'm proactively looking at my performance of my application. So, the thing I like to do is I go to this performance blade, I'll sort by all of my controllers or all of my operations in the cloud, from frequent to least frequent. That gives me an idea of what my customers are doing. And, then I can look at this duration to see what the experience is that people are having. And, if I go to the 95th percentile, that means, hey, 5% of my customers are starting to have pretty dodgy experiences like over eight seconds for a request. So, that's definitely something we're gonna wanna do. And, then the cool thing is, we can just get some profile traces that open right up in Visual Studio's profiler. Yes, I have two questions for you real quick on the diagnostic stuff. Yeah. Because, obviously, we cheated ahead of time and said we had really nice integration with Visual Studio as well from this. So, first of all, is the exception view that you had. That's super cool, super kind of interesting, needed in a lot of cases. We saw there was an issue that popped up in the cloud that we were able to debug that I hadn't thought of or hadn't tested that scenario in my local machine. And, matter how thorough we are about testing stuff, that's always gonna happen. Is there any way for my own kind of dev test environment as a developer that I could bring that exception information back into Visual Studio without the need to go monitor the portal regularly? Yeah, definitely. So, there's integration of Azure monitoring and these application failures from application insights right inside of the IDE. So, you can just navigate to application insights in your project and it'll be linked up. Sweet. Second question. You showed me the great debugging experience in the cloud with snapshot debugging. We know Visual Studio has snapshot debugging. Yes. Any way that if I decided I wasn't getting enough information out of the variable view you gave me in the cloud, I could bring that back and debug it kind of like a dump in Visual Studio. Yeah, definitely. We glossed over it, but there was a blue button that said open Visual Studio. So, you do that and it actually creates the kind of dump file and metadata that we understand in Visual Studio and it opens right up, loads your symbols and gets you going. So, you'll always get a better experience inside of Visual Studio and we link to that. But this, we also think it's pretty cool just whether you're an operator, DevOps or dev, just to have something in the portal that leads you in the right direction. Yeah, obviously portal is where it starts, but as a developer it's really nice that I can get that view on my source code from exceptions and if I really needed to dig in deeper into that dump file. Last question. Is that application map loaded? Because I love the application map. Let's see. No, not going to work for us. There we go. It is pretty sweet. This is an aggregate view showing the topology of our services. So, we have the web app and the functions and then, you know, this is a little distributed app. So, we have the storage services like Blobs and SQL and one thing that I'm always looking for is the health. So, I can actually drill in and look at when I have a failure rate or slow requests. I can navigate right from here. So, it's just a helpful navigation visualization tool. Yeah, I think the really awesome thing with that is you didn't do anything to build that, right? The diagnostic tools, Azure Monitor automatically built that map by tracing the data flow through the application in the cloud. It wasn't like you had to upload a JSON file or something. Exactly. In fact, there's even a teeny bit more to the story just to geek out for a second. So, .NET uniquely helps auto-trace exceptions and auto-trace requests in conjunction with Azure Monitoring so that there's things like correlation IDs and that we understand a transaction through all of these components. So, it's actually the combination of .NET plus Azure Monitoring that make it work. That is really cool. It's just real quick refreshers. We talked to Paul briefly showed Azure Monitor, which is our solution built into Azure for diagnosing problems that you would have, whether it be DevTest, production doesn't matter, or anything that's running in Azure. And that has some deep hooks into Visual Studio to make it really easy to bring some of that information back to your workflow as a developer. Real quick, as I promised, we have a couple of resources. So, you can get the sample app that we were playing with if you want to steal Paul and I's idea and see if you can out-compete us to the five-cent application. I would encourage you to do better, yeah. So, aka-link is up there. So, just type in that URL and it'll take you to the GitHub repository. Also, there's a lot of prerecorded sessions that we go into a lot more depth on various tooling in Visual Studio 2019 and call gives a really great overview of container tools that we just briefly mentioned but didn't have time to touch on here. Sweet. That's Seth. What questions do we have? What do we got going on here? That was awesome. One of the coolest things about working in the cloud, specifically the Visual Studio, is it feels like the experience I used to have when I knew what was going on locally, I can now also have with the cloud. Is that what we're going for? That is what we're going for, yeah. And it's gonna be not possible in every case. There's certain things that are hard to simulate locally but for the really common scenarios, we definitely want to try to make it really easy to do it locally. And there's some things we've been wishing for for a long time that we can actually do now because there's enough compute power and enough data in the cloud. Like we can predict what your top errors are and we can help you debug it without breaking production. That's cool. All right, so let's get into the real question. So for those of you that are out there watching, we want your question. So please have them come in, I'll get them on the board. So the sooner you get them on, the sooner I'll ask. From Mick, will the ability to run Azure Functions locally be available with the Mac edition? Easy answer to that. Yes, it has already exists in the Visual Studio for Mac edition. Okay. I think they shipped it last summer. So also from Mick, and he used some strong words. I'm just gonna block this part. Any new tooling for the beautiful ARM templates? Yes, I'll take that one. So we have far better IntelliSense that you'll see in this version. We worked on the performance to make it bindable a lot faster and also so that we can use schemas that are provided by Azure for each of the many hundred resources that we have. So that'll make IntelliSense definitely a lot better. And we know there's just so much to do with ARM. It's a target-rich environment with many opportunities. Target-rich environment, that's like my garage. It's also a target-rich environment and things that I can do there. Just to elaborate a little bit on what Paul said, a lot of that work is still in flight. So you'll see somewhat better performance if you start with 2019 today. But we actually have a team of people with I don't know, six engineers or so actively working on better at ARM tooling as we speak. And so that will, it will continue to get better. Yeah, you know, like the first time I actually used ARM templates, once I understood what was going on, it was pretty powerful for me to be able to stand up an entire infrastructure of things with a single call. Absolutely. And so I mean everyone, look, whenever I build software and someone's like, hey, you know, can it also do this or can you fix this part? It means that I've got the right core and now we just got some details to work out. So here's a question for you and this is for me. How do you prioritize the features that you put in with the software? Like what, what is it like, for those that are watching, I mean it's not like we have a dart board and it's like, oh, we didn't hit ARM templates so we're not doing that one. What is it, what is it like for you all? Take it first and then Paul can correct me where I can stop. I mean the short answer is feedback from our customers is the number one area we use to prioritize. So, you know, we have the developer community built right into Visual Studio where you can file suggestion tickets and issues. Really that's the top thing that goes in is what do we hear from people that they need, what needs to be improved. Then the other thing that comes into play is trying to talk to the Azure team quite regularly and understand what's new, what's coming, what needs tooling. Obviously we don't want new experiences or new application types to be in Azure that you can't tool or build in Visual Studio with .NET. I think those two are really the top two things that feed into it is what are customers asking for and where is the platform going, what is the platform working on that's gonna need tooling. Yeah, I mean I agree with that. We wanna make customers successful at the end of the day so it's all about that and we get a good signal through customer feedback. We actually use the telemetry too on usage so that's super vital to understand areas that have a lot of usage but maybe also don't have the good feedback to go with it. So that's pretty huge. And then in general we just try to make the biggest impact we can with the resources we have which I think is like many companies. So if someone's using Visual Studio and they're going to use Azure what would be the first thing you would point them to? Like day one, if you're using Azure in Visual Studio you should definitely look at this thing, what would it be? Yeah, I'd say basically the app that I demoed minus the functions is start with an ASP.NET net core application and try to publish it to Azure App Service. That's really the best way to get started with Azure. You have the ability to turn on all the diagnostics tooling that Paul talked about. We didn't show it but if you're just doing it for your own purposes you can actually remote debug to App Service directly from Visual Studio. So it's a very familiar comfortable place to start getting familiar with some of the concepts and trying to run something in Azure. Yeah, web apps, the web app and App Service works very, very well for any kind of stateless application, stateless front-end web app, a stateless web API. So for that kind of course-grain service it's just great and so many things are built in from SSL to slots. So definitely start there. Awesome, so one more question and then we'll wrap up if that's okay. From Kendall, logic apps supported VS 2019 and or at Cosmos DB instead of just Azure SQL or Azure Storage when publishing. Is this something that we'll be able to do soon? I can't see the question, it's kind of two-part. So there is extensions for building logic apps for Visual Studio already today. So those should work. You just have their separate acquisition from the Visual Studio extension gallery. And then the Cosmos DB on our radar, again kind of give us that feedback and let people vote on it. It's simply a question of we'd like to do it. We just have to prioritize it against other asks and other work on our plate. We did do some cool tooling in Storage Explorer which I know you had up there. So we have first-class tools now for Cosmos and that's pretty recent. Awesome, well thank you so much Andrew and Paul that has been amazing.