Writing C# in VS Code Is Finally Awesome!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everybody I'm Nick and in this video I'm super excited because I'm going to be introducing you to the brand new experience of writing and working with C sharp in Visual Studio code this has been in the making for quite a long time and we knew it was coming but it's finally out in preview and we can use it so in this video I'm going to show you how you can install it what it is what we get on top of what we had already and also raise a couple of minor concerns you should know about now you might be a bit confused if you watched yesterday's video I made the video already on this which was pretty negative but it turns out that I was alone mostly in thinking of the negatives of something like this an initiative like this so I can admit when I'm wrong and I took that video down and I'm making this instead showcasing what we are getting I will still mention the thing I mentioned in yesterday's video but that's in the end just so you're aware if you like that of content and you want to see more make you subscriber for more training check out my courses on domtrain.com okay so let me show you what I have here I have good old Visual Studio code and if I go to extensions you're going to see that I have the C up extension the Omni shop based extension that all the c-sharp functionality is based on and with that I can actually just load any project as a folder and start working on it for example if I select this folder over here this is actually the folder on one of the workshops I run around the world where I teach people in this case testing unit integration and performance testing and if I expand things here as you can see I have my solution I have my faulty structure not much context everything is just a folder but I can actually see my C sharp so I can open something like this my test over here and go into a service and see my tests and I can't do much but I can do enough I can work on it I have intellisense so if I say logger Sut whatever dot I have all that goodness in here and I can actually work on the project and if I want I can use a terminal to create a new project build restore clean everything so I have full C sharp capabilities here but it's a more primitive version if you compare with something like Visual Studio or Rider but that is fine it's very usable and many people have been making awesome products with this now here's what we are getting I'm going to just close this and I'm going to also close this folder so we have nothing over here again and I'm going to go into extensions and search for C sharp dev kit and that is the brand new extension that actually completely enhances the functionality of C sharp in Visual Studio code so I'm going to choose this preview version and I'm going to say install and by just installing as you're going to see we also gonna get this one installed over here the intellicode for c-sharp dev kit now this is optional I can uninstall it if I want and it will not remove this but know that we can also have now intellicode support and this is sort of additive on top of the Omni shop based extension so now that we have both of them installed what I can do is I can do the following I can go back here and as you're gonna see now we have this create.net projects button and if I click on it then as you're gonna see I'm able to choose one of the templates to create a project so as we can see you can just say for example here create a new web API now I'm going to select the folder I want this to be created into and then once I do that I'm going to be asked for a very basic hey give me a name on this and I'm going to say example web API you don't get many options like hey do you want authentication do you want Swagger support do you want this to be a minimal API or a normal like you don't get any of that for now you just get the name I assume this will change in the future and once you do that by default you're going to see the same folder view however and I wish this was a default actually if you collapse this you're gonna see this solution Explorer over here and now we have more something akin to what we are used to with well a solution and a project so if I click here I can see a proper C sharp highlighted solution over here with weather forecast now ignore these small errors is a bit of a clashing with my.net version it's not much of a problem I can easily fix that but now we have this and what's awesome about this is that we have contextual settings so I can say for example example clean this project and it will do it in the terminal over here I can say rebuild this project and it's going to do that as well so I have contextual settings and I can do things on the solution level as well so clean rebuild closed solution and all that goodness and also things like create a new project and existing project add solution folders things you would do in Visual Studio as well now if I go and I load that previous big chunky solution again then not only is loading pretty fast actually but if I go to solution Explorer I have this very nice view where you can even see my source solution folder and my test folder over here and I can go and open one of the test classes and what's awesome about this implementation is that now I have a very nice test Explorer which I can just say for example here hey go ahead and run this test and I'm getting this very nice view where it will just build the project by just pressing the play button run the test and as you're gonna see we have the Test passing over here and I can just say hey run all the tests in here and it is going to do that all four of them will just automatically pass it is very very handy very very nice and since it is made by Microsoft we know it's going to be very well supported now another pretty neat thing is that you now have net related commands so you can do things like rebuild build clean new project add existing projects some really really nice functionality just by saying.net whatever I can just do you know build and that is it now that is all fantastic but I do have to mention a couple of things first this plugin is closed source so this is not an open source plugin you won't be able to see what is in there and that is fine because the basic omnishop based one will still be open sourcing you can use it for whatever you want but sort of assume that most of the good features will actually be on the dev kit and why can that technically be a problem well because of the license the way c-sharp dev kit is licensed is very similar to how Visual Studio is licensed in fact it is technically the same license so for individuals it is free but if you're an organization who is not doing open source under an OSI approved license project or you're not doing education or classroom training or any of that then if you have more than five developers then you have to actually pay for a license and you're an Enterprise if you or your Affiliates collectively have either 250 PCS or users or make more than one million in revenue and arguably that is absolutely fine because if you make a type of money you definitely can afford a visual studio code license or a visual studio license however that also puts it against something like judge Brands Rider which is the idea of choice for me because Ryder is actually cheaper than those licenses and it's also ecolicross platform and it has more features so if you're using visual studio code with the dev kit then it is not really the same free experience as it was before and you should be comparing it with jetblance rider and other IDs however it does mean that if you already have a visual studio license whether that is professional or Enterprise eyes you can actually reuse it to use C sharp dev kit in your application just a thing I should mention that was the majority of what I talked about yesterday but it seems to not be that much of a problem for most people so I can be when I'm wrong and in that case I definitely was so that's all the information you need that's only the beginning it's only gonna get better and I actually root for this to be better because I do use resource video code in Long flights it is way better for my battery than Rider so when I'm doing basic things I am using it and I really want to see how much of all those Visual Studio features the team can actually bring in here and have them in a truly cross-platform way officially supported by Microsoft but now I know from you what do you think about this and do you have any concerns or any worries leave a comment down below and let me know well that's all I have for you first video thank you very much for watching and as always keep coding
Info
Channel: Nick Chapsas
Views: 128,410
Rating: undefined out of 5
Keywords: Elfocrash, elfo, coding, .netcore, dot net, core, C#, how to code, tutorial, development, software engineering, microsoft, microsoft mvp, .net core, nick chapsas, chapsas, dotnet, .net, visual studio, visual studio code, vs code c#, vs code c# ominsharp, omnisharp, c# dev kit, c# dev kit vs code, c# dev kit for visual studio code, Writing C# in VS Code Is Finally Awesome!
Id: a-dQYcA2qN4
Channel Id: undefined
Length: 7min 48sec (468 seconds)
Published: Thu Jun 08 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.