 Studio mic. All right. So we are sitting here with Syed and he's going to run through some Visual Studio for Mac. And ready to get started? Yeah. All right. So we're going to hit HDMI and we're going to share your screen. All right. Let's do that. All right. I'm telling you. Welcome to Getting Started with .NET Core 3 and Visual Studio for Mac. I'm Syed Hashimi, Program Manager on the Visual Studio for Mac team. Before we get into the demo, I'll just take a minute to run through the different types of apps that you can create with Visual Studio for Mac. So there's primarily three different types of apps that you can create with Visual Studio for Mac. You can create the mobile apps. You can create the mobile apps with Xamarin. You can either use Xamarin Forms to share both logic and UI, or you could develop with sharing your logic and then implementing native UIs with Xamarin iOS or Xamarin Android. You can also develop web and cloud applications using .NET Core and ASP.NET Core, and that's going to be the meat of this talk. So we'll get into a lot of those details soon. You can also develop games and real-time 3D apps using Unity. All right. Let's go ahead and get started with the .NET Core 3 related features. Okay. Let me get out of this one. All right. Before I show some demos with existing projects, let me show you how to create a new .NET Core 3 project. So we go to File, New Solution here, and then .NET Core. All right. Here we go. So .NET Core. So here we've got a variety of different types of apps that you can create, a console app or various different web apps. We've recently added some templates here. So you can see we've got Worker and some Spot-type templates here. All right. Let me go ahead and cancel that. I'll open up a existing solution that I have here. All right. So this solution is a .NET Core global command that I've been working on for a little while. What I wanted to first cover was support for C-Sharp 8 and .NET Core 3. So with the Visual Studio for Mac 8.3 release, we have full support for C-Sharp 8 and .NET Core 3. In addition to enabling you to author your code with C-Sharp 8, the IDE also tries to find areas in your code that you can simplify or clean up by using the new C-Sharp 8 syntax. From lines 18 to 21, you can see I've got some using statements here and there's a little green underline. Let me go and see what the suggestion is here. So we've got a quick fix. All right. We can see one of the suggestions is to convert the using statement to a simple using statement. Let me try that. All right. We can see it's simplified it a little bit. From here, I'll do the keyboard shortcut, which is option Enter and also the same for this one. All right. So there we go. We can see that it's taken my C-Sharp 7 code, kind of cleaned it up a little bit using the new C-Sharp 8 syntax. It's a lot easier to read and a lot easier to digest there. So that's really helpful and really very cool. Let me show you another quick fix that we have. It's not specific to C-Sharp 8, but it's one of my favorites. I'll go ahead and show that one to you as well. So here we can see I've got a call to string format. So I'll do a quick fix for this one. We can see that it's giving me the option to convert to interpolated string. Let me try that out. All right. So it's converted my string format to interpolated string here. So yeah. So this is another area where it's a lot easier to read and a lot cleaner code there. All right. So that's what we've got before we go on to the next demo. Let me just build this application, make sure that it still works. So I'll do build all, make sure we haven't introduced any errors into this project. All right. We can see it's building now. Give it another second to finish up. All right. Perfect. Okay. Great. All right. So now let's move on to, let's move on to talk about the new web editors that we have. So in 8.2, we replaced the C-Sharp editor with the same C-Sharp editor that we have in Visual Studio running on Windows. And in 8.3, we replaced the web editors. So those are CSHTML, HTML, JavaScript, CSS, JSON. Those are all basically brand new in Visual Studio for Mac in 8.3, and they're all essentially the same editors that we have in Visual Studio on Windows. All right. So here the application that I've opened up is a, it's actually the ASPINnet Core Beginners Workshop. And then there's instructions for Visual Studio for Mac, for Visual Studio and Visual Studio Code. And it's all on GitHub. And the link will be at the end of the slide here. All right. So let me kind of quickly go ahead and run this application, make sure that it's working fine. So I'll do start without debugging. All right. And we're probably gonna do start without debugging a few more times during the session here. So I'll take a note of the keyboard shortcut. So it's option, command, return. So we'll be using that keyboard shortcut for the following times that we start without debugging. All right. So here we go. So let me navigate to the movies page. Okay. So we've got, there's supposed to be some content here, but I think I might've opened up the wrong version of this app, but that's okay because we're not gonna be interacting with this application anyways. All right. So let me show you some of the enhancements that we have in the razor editor here. All right. You can see we get the same type of Intel Sense that we get in Visual Studio running on Windows. Another enhancement that we get by switching over is the ability to have Intel Sense and completions for languages that are embedded. So for example, here I have a razor page and I'm gonna embed some JavaScript here. All right. So we can see we get the, we get the same type of Intel Sense that we get when editing on Visual Studio for Windows. If you've used the Visual Studio on Windows, this should feel like a very familiar experience there. All right. So let me go ahead and stop that. I'm gonna open a different application that I've been developing or that I've developed in the past. Couldn't save that. And this app is kind of more of like a basic app. We've got some JavaScripts here. So what I wanna do is show you now the typing experience with JavaScript. So what I'll essentially do is basically retype in lines one through 12 so you can see what that experience looks like. All right. So we can see we get some great Intel Sense here with nice descriptions and you can look through the different overloads as well. All right. So here we go. All right. So yeah. So very kind of similar Intel Sense to what we've seen before in Visual Studio on Windows. Oh yeah. So it should be very familiar if you've used VS on Windows there. All right. So we'll go ahead and stop it at that. We'll move on to another demo here. Okay. So I'm gonna skip the CSS editor because we got a bunch more demos here but I might get back to it later on if we have time. All right. So let me close out of this and go into a new application here. Also close out of that. All right. So let me do... I'm gonna keep this one open. I'm gonna right click and say New Instance. This is a relatively new feature as well. So the application I'm gonna be opening up here is actually an Azure Functions application. While that's opening, let me show you how you can create a new Azure Functions project on your own. So I'll go to New here. Under Cloud General, we can pick Azure Functions. And then here's the list of Azure Functions templates. You can also see we've got a ability to update these templates before we create the project. So it's always recommended to go through and do that. All right. So let me go ahead and cancel out of that and I'll go back to the open here. So this is an example of a durable Azure Function and this actually was created by Brady Gaster. He let me borrow this code here. So let me go ahead and start running this. I'll start without debugging and it was option command return. This application actually, it consists of a web app and a few Azure Functions and then the web app has real-time updates coming through via SignalR here. So we'll see how this works. You can see the terminal's been opened up here. Let me go back to that. So this is the Azure Function that's starting up from the project that's been loaded up here in Visual Studio for Mac. So we'll go ahead and let that, we'll give it a second to kind of warm up and get ready. And then here is the web application itself and the idea is when you send a loan, these different tiles will start lighting up to indicate that something's happening. So let me go to my terminal. Okay, so here we've got the Azure Function. So I'm about to send a loan request here. So what we wanna do is keep our eyes on the Azure Function as well as the website here. I'm gonna use the .NET HTTP REPL command here to open a connection to that API. Let me type in the command. So I'm gonna do a post. All right, so the customer name is Brady and we're going to request a loan of $100,000. All right, so yeah, I'm gonna hit enter, keep an eye on the function to see that that one's lighting up and also the web app itself. I think I missed type something here actually, one second. Let me, I think I made something wrong here. Let me go and grab my, let me go and grab this line so I can just copy it. Okay, all right. So I've got some kind of error going on here. I'm not sure what I've done to this. I think maybe I've done something to this. Let me turn this off and terminate everything. Let me try it one more time. Let me make sure this one's off too. Okay, let's try it one more time and then that doesn't work. We'll go back into the next demo here then. All right, so it looks like we're good. Okay, let me try it one more time. Let me close that connection. Okay, all right, that's fine. I must have introduced some sort of error here. This was definitely working, yep, last night. But anyways, when I submit that loan application we would have seen these tiles start lighting up. Like there would have been a, this would have activated and then if the loan was approved we would see some green check marks here. I think I just made some sort of a mistake there on that one, so I apologize for that one. All right, let me go and close out of this and then we'll go back to the next demo. Close out of this instance of Visual Studio for Mac. All right, so now I'm gonna open up the, this is another kind of sample application that we have. There's actually like almost, it's like essentially like a book that's been written on this one. And you can follow along either in Visual Studio or Visual Studio for Mac. It's called eShop on Web and we'll have a link to this in the last slide as well that we'll get to. In this case, you can see this is not, it hasn't been updated to .NET Core 3 yet. We can see that it's still using .NET Core 2.2 in the Docker file. So this application is also leveraging Docker here as well. So we can see we've got the Docker file inside the web project and we've got the Docker compose web project here as well. Let me go ahead and start without debugging. While that starts, let me point out that we also have a, there's a full suite of unit tests that come with this application. So three different unit test projects. I'm gonna go ahead and open up that pad and we'll get that one ready. We're gonna be running those unit tests here pretty soon. So the eShop on Web sample application is essentially like a shopping cart type of app. You can go into the app and you can add certain things to your basket. Let's say I'll like this .NET bot sweatshirt. So I'll add that to my shopping cart and then maybe I'll add this cup of tea to my shopping cart. And then I can check out. We've got the login functionality here as well. And then it just pretends like it makes an order. You know, so this is not a, this is just a sample app. So we don't actually submit the order anyway, anywhere here. All right, so that was that one. All right, so now let me show you how we can run these unit tests here. So here we can do run all to run all the unit tests at the same time. So let me go ahead and do that. But in addition to that, if you wanted to run any set of unit tests, all you have to do is right click on the node and then say run tests. Yes. All you have to do is click on the node and say run tests and then that will run the tests that's under that particular node. So if I only wanted to run the unit tests, I could always right click on the unit test node and say run tests. Or if I wanted to run everything, I can right click on eShop on web and then run tests there. We can see here now it's gone through the unit tests and also gone through the integration tests and finally went through the functional tests and everything has passed. So that's really great. Let me show you another feature that we've recently added here. So a couple of these unit test projects use the mock NuGet package. So what I want to do is I want to update that NuGet package for all the projects that use it in my solution. So I'll go to, I right clicked on the solution and I'll say manage NuGet packages. I'll go to updates. I'll find the particular NuGet package that I'd like to update and select that and then say update package. At this point, it presents me with a dialogue that shows the projects that are consuming that package and gives me the opportunity to check or uncheck the projects that I want to install that into. I'm just going to click cancel here because I don't want to actually do that at this time. And if you're bold, we also have update NuGet packages on the solution node and this one would update all the NuGet packages. I think maybe that's not really a feature for me but it might be a feature for you. All right, so now let's take a look at take a look at some other stuff that we got here. Okay, so now let me go back to, let me open a different solution that I have here. So this is a web app that I've been working on for a while. I recently converted it over to .NET Core 3. Let me go ahead and start running this one. So option command enter. So this application is a ASP.NET Core web app that will display the different templates that are available for .NET Nu. And, oh yeah, right, okay, great. So this actually, so now what's happened here is I tried to run my application and when the web app came up, it says, hey, I couldn't make a connection to this API. And the reason for that is when I launched this app, I just launched the web app itself. But there's also an API application here that needs to be launched at the same time. The way that I'm gonna do that is I'll right click on the .NET Nu on the solution node. I'll say set startup projects. Now we need to create what's called a solution run configuration. I'll just go with the defaults here. And then we pick the projects that we wanna start with this particular run configuration. So I'll pick the API and the web project and click okay. All right, we can see that. You may have noticed that it switched from templates web which was the web project to multiple projects. Let me go ahead and start without debugging. So option command enter. All right, so now we can see that it first launched the API project and then it launched the web project. So that was an example of how you can launch more than one project on start for either start without debugging or start with debugging. However you start it. All right, so let's take another kind of look at this web project that we have here. So I've got the, let me open up the the www root folder here and expand some nodes. So you may have noticed we've got file nesting here. This was also recently added so the file nesting that you see here in Visual Studio from Act should be the same exact file nesting experience that you have in Visual Studio when working on Windows. So that's really great. And let me show you another feature that we've recently added as well. So here we have the launch settings.json file. So this file, this file will describe how the application should be, how the environment should be set up for when the application is launched either debugging or without debugging. And this file is used not only in Visual Studio on Windows but also you can use this file from the .NET CLI when doing .NET Run. And now you can leverage this file in Visual Studio from Act as well. All right, so in this file there's primarily a couple of things that you'd probably be interested in fine tuning or customizing. Those would be the environment variables that are there and a specific environment variable to definitely keep an eye out would be ASP.NET Core underscore environment. So we have that set to development and also the application URLs. If you'd like, you can definitely feel free to edit this file directly with any additional environment variables or tweaking any settings here. But you can also interact with that through our project options. So you can right click on the project, go to options. And then I'm gonna go into run configurations default. Let's move this over here a little bit. All right, so we'll say demo name .NETConf and let me go through and change the URL as well. All right, so we're gonna keep an eye out on this launch settings.json file when I click okay here. All right, so we can see that it has added the demo name environment variable that I've got there and it also has edited my application URL. So let me go back and we'll undo that before I forget and break things. I go through and remove that, set these back to what they were. All right, so we've got that. All right, cool. So now let me show you a, let me show you the navigate to window here. So in the top right hand corner, we've got navigate to, we can use that for a variety of different tasks. And the way that you can get into that is command dot. So if I do command dot, I can do various different things here. Like I can run commands, I can search through my solution. If you wanna run a command, you'll prefix it with C, you'll say start, oh, sorry about that. Oh, I accidentally hit command to Q on that one, my bad. So yeah, so you can run various different commands there, like start without debugging. Let me go back. I will just do razor pages movie here. Let that one mode up. All right, so we're all loaded up. So I'll do command dot one more time, say C colon start. Okay, all right, so I must have run into something there. I didn't actually try that ahead of time. So I run into some sort of problem, but this is not the bill that I have here is actually a few days old. It's not actually the real RTM bits there. So I'm just gonna say this is probably just like the Frankenstein bill that I get going on here. All right, cool. So I think that was mostly what I had. I think we have a few minutes left for questions, no? Cool, so I'm gonna switch over to host, right? Is that right? Yeah, perfect. Look, I know what I'm doing. Yeah, right. All right, so we've got a couple of questions. All good stuff. I think we're making a lot of headway in the BS for Macs up there. Jay Haldago, seven asked, database projects support in BS for Mac. We had that embedded in Windows. Obviously we've got 20 years of development on BS for Windows. Any ideas if we're gonna do that in BS for Mac? You know, that's a really great question. So you know, just kind of like what you mentioned, you know, we've got like 20 or maybe even 30 years of development with Visual Studio on Windows, right? And Visual Studio for Mac obviously has a lot of ways to kind of go to kind of compete and to try to get after that breadth of support. The way that I would look at it, right? The way that I look at it right now is, you know, we have three primary areas, which I mentioned were mobile, web and cloud, and then games in 3D, right? So what we're trying to do is we're trying to make sure we have a really great experience around those three and bring ourselves up to par with those scenarios, with Visual Studio on Windows. And then we can just kind of keep up to date as they ship additional features. After we get to that point, then we're gonna start looking at kind of expanding a little bit in the breadth, right? So we'll look at things like database projects, C++ support, and then various other different, you know, like let's say Azure projects, and yeah, and it's all kind of driven by customer feedback, you know, like obviously here in DevDev, we're very kind of customer oriented. And so once we basically get through our fundamentals and fix the stuff that we have now, we're gonna take a closer look at customer feedback for what areas should we then start investing in going forward. And then, so basically, you know, we fix what we have now, and then slowly start to expand out the breadth. But yeah, that's a really great question. So as you were doing the presentation, the same topic kept coming up over and over and over, and that's Blazor support. Oh yeah, Blazor support, yeah, right. So that's something that we're actually working on right now. And for Blazor, for Blazor server side applications, you can edit and debug and run Blazor applications the limitations today are, you know, we don't have editor support. And with 8.3, the team was strictly focused on existing editors that we had in Visual Studio for Mac, and replacing those with Windows and making sure we don't have any regressions in those scenarios. And they were very busy doing that. There was a lot of work. So now that 8.3 is behind us, they're also gonna start tackling the dot razor files. Those are the files that we use in Blazor applications. So the goal is to have that in 8.4, but obviously, you know, there's no promises on any particular timelines, but that's what we're working towards. And it's definitely something that we're all kind of very excited about getting into, just haven't had a chance yet to actually finalize that. Last thing that we always see in all of our demos. Right. ES Live. Oh yeah, right. Live share. Live share, yeah, that's right. So that kind of goes back to my previous point. You know, we wanna really try to make sure that we have a really great experience for what we call the inner loop. That's where you're working as a developer and you're developing your application. And we wanna make sure we've got that set up straight. So we're not quite there yet, I think, but once we kind of get everything kind of in shape, then we're gonna start kind of thinking about things like Live Share and those sorts of things. Yeah, that's right. All right, well, thanks for coming on, showing the BS from us. Yeah, right. I know I'm using it more and more every day and kind of seeing what the rough edges are and where we can improve the product and see what's there, so thanks for your time. Okay, could we show my last slide one time over to the last slide and we'll get that, the HDMI. And there's our resources for getting a hold of the demos and the slides and the resource. Yeah, and definitely follow us on Twitter as well. We have a relatively new Visual Studio for Mac Twitter handle there. Yeah, thanks for having me on the show today. Awesome, so we're gonna transition and it looks like we've got Cam coming up with it. So Cam's gonna talk about running his house on .NET and doing smart home automation. Awesome.