The Modern .NET Show

S06E15 - Code, Coffee, and Clever Debugging: Leslie Richardson's Microsoft Journey and the C# Dev Kit in Visual Studio Code with Leslie Richardson

Sponsors

Support for this episode of The Modern .NET Show comes from the following sponsors. Please take a moment to learn more about their products and services:

Please also see the full sponsor message(s) in the episode transcription for more details of their products and services, and offers exclusive to listeners of The Modern .NET Show.

Thank you to the sponsors for supporting the show.

Embedded Player

S06E15 - Code, Coffee, and Clever Debugging: Leslie Richardson’s Microsoft Journey and the C# Dev Kit in Visual Studio Code with Leslie Richardson
The .NET Core Podcast

S06E15 - Code, Coffee, and Clever Debugging: Leslie Richardson's Microsoft Journey and the C# Dev Kit in Visual Studio Code with Leslie Richardson

Supporting The Show

If this episode was interesting or useful to you, please consider supporting the show with one of the above options.

Episode Summary

This episode is a conversation with Leslie Richardson, a senior product manager at Microsoft. Leslie has been working at Microsoft for six years, primarily in the developer division, focusing on tools for developers. Currently, she is a part of the C# developer experience team, where she works on projects like Razor, C# Dev Kit, and .NET Aspire.

Leslie’s passion for debugging and extensions is evident in her previous work on the Visual Studio debugger and the Visual Studio extensibility team. She also hosts the Visual Studio Toolbox show on YouTube and Twitch, where she invites her coworkers to discuss cool things in Visual Studio.

The main topic of discussion in the episode was the C# Dev Kit, a new extension in VS Code that enables developers to write C# applications in a more productive manner. Released in early October 2023, the C# Dev Kit aims to improve tooling support, performance, and reliability for C# development in VS Code. It addresses pain points such as slow code colourisation, file and solution loading times, and debugging capabilities.

Prior to the C# Dev Kit, developers using VS Code for C# development often faced frustrations, especially with debugging. The C# Dev Kit aims to streamline the debugging process and provide a more seamless experience. It also offers compatibility with Copilot for AI-based code completions.

The C# Dev Kit supports various project types, including ASP.NET Core web API, ASP.NET Core web UI, Blazor, .NET MAUI, console apps, test projects, and Unity-based applications. It also includes project templates to help developers get started without starting from scratch.

One notable improvement with the C# Dev Kit is the enhanced functionality of the Test Explorer window in Visual Studio Code. Before the C# Dev Kit, the Test Explorer window was not very functional and did not automatically recognize tests in the test project. Now, with the C# Dev Kit, the Test Explorer can recognize tests and display their statuses in a tree view format. It is compatible with major testing frameworks like MS Test, NUnit, XUnit, BUnit, and Playwright.

Episode Transcription

Yeah, so C# Dev Kit, it is a pretty new extension in VS Code. We just GA’d it back in early October. And it’s an extension that basically enables you to be productive writing C# applications in VS Code

- Leslie Richardson

Welcome to The Modern .NET Show! Formerly known as The .NET Core Podcast, we are the go-to podcast for all .NET developers worldwide and I am your host Jamie “GaProgMan” Taylor.

In this episode, I spoke with Leslie Richardson about the C# Dev Kit, a new extension for Visual Studio Code which aims to make the experience of writing C# and .NET code in the free editor more productive. It improves the experience of working with almost all code bases which use modern .NET, and includes the ability to even run and explore your unit tests within VS Code - something that wasn’t easily doable previously.

I know before C# Dev Kit existed, the Test Explorer is a window that exists by default in VS Code. But yeah, you’re already laughing like, "oh yeah."

So it wasn’t very great pre Dev Kit from my understanding, like simple things such as being able to automatically recognise your test once you build your test project. That was not a thing, which blows my mind. I’m like, "but then what are you supposed to do? Just manually add them in? That doesn’t sound fun at all, especially if you’re trying to do the whole test-driven development." You’ve got tests everywhere and it’s like, "well, that’s 50 some tests I have to log in. Yippee. I love testing."

Yeah, I can’t imagine that’s a great experience. So thankfully, with C# Dev Kit, we’ve actually made the window functional. I know, bare minimum, but I still think it’s pretty good. So when you build your test projects, it should be able to recognize everything that you have registered as a test via like a test method attribute or whatever kind of test type that you’re using.

- Leslie Richardson

So let’s sit back, open up a terminal, type in dotnet new podcast and we’ll dive into the core of Modern .NET.

Jamie : So, Leslie, welcome to the show. I really appreciate you taking the time out of your super busy day, and coming on the show to talk with us about what we’re going to talk about. So I know you’re a very busy person, so just want to thank you in advance.

Leslie : Well, thanks for having me, Jamie. This has been like a long time coming.

Jamie : It has, yeah. Just a little bit of insider baseball, I think. I first approached Leslie to see if you’d like to be on the show at MVP summit in 2023. And we’re recording on 11th of January 2024. All I’m saying is sometimes life gets in the way, right?

Leslie : Yeah. But it works out in the end.

Jamie : Absolutely. Yeah. Because we’re talking now, right? What’s the problem? Here we go.

Excellent. Okay, so I wonder for the listeners, would you mind giving us a bit of an elevator pitch of you, and the work that you do, and all that kind of stuff?

Leslie : Sure. So my name is Leslie Richardson. I’ve been at Microsoft and within the developer division working on tools for developers since I joined Microsoft six years ago when February hits, which is crazy. My first team that I… Yeah, so time flies. And I’m a senior product manager currently on the C# developer experience team. So right now I focus on a lot of razor stuff, C# Dev Kit I was focusing on when it was first being developed and first having its initial preview.

And I also work on .NET Aspire these days, which just got announced back in November, which is super exciting. I mostly focus on the dashboard experience for that, which. It’s a cool way to increase your productivity with cloud native applications specifically. And before all that I was working on the Visual Studio team. Pretty passionate about the Visual Studio debugger, which was the first team I had ever worked on. And I also worked on the Visual Studio Extensibility team. So I like debugging, I like extensions.

And when I’m not doing either of those or any of those, I also host the Visual Studio Toolbox show Shameless, plug on YouTube and Twitch, where I like to coerce or convince some of my coworkers to come on my show and we talk about cool things in Visual Studio.

And yeah, that’s kind of the gist of me. Outside of work. I also like to read huge Disney fan, huge Lego fan. I play piano. I’m pretty nerdy outside of guess.

Jamie : Nice. I love that when people are able to, they feel like they can talk about their passions. Right. So like one of my things is I’m a bass guitar player and I studied Japanese when I was at uni. So I’m like, "oh, cool. I have this weird connection between japanese music and music, so, like, all right, cool. I can play this stuff and sort of figure out what they’re singing about as well," which is, know, interesting.

Leslie : That’s super cool. Japan’s at the top of my bucket list, so I’m like, probably going to start trying to see if I can pick up a little bit of Japanese before I do that, before travel.

Jamie : Sure. But, yeah, that’s awesome.

Yeah, so Japan is one of those places that I’ve been, like, a handful of times, and every time I go, I end up going somewhere completely new. And there is a small audience for this show in Tokyo, so, "hey, everyone!" I’m not trying to upset anybody, but the way I see it is when I’ve been to Japan, I’ve wanted to see real Japan, if that makes sense, like, meet the "real" people. And so the way that I’ve done it is I’ve actually travelled to the south of Japan, like Fukuoka, Nagasaki, Sasebo places.

Leslie : Ah, ok.

The problem with those places is if you go off the beaten track, you need to be able to talk with the people. So that’s always fun, like going, "oh, no, I’ve just started a conversation with someone and my brain has left my head and now I don’t know what I’ve got to say."

Leslie : It’s like I can barely speak my native language sometimes with people. I definitely make an effort with whatever language when I travel, too, but yes, I’m usually tripping over my words, so it’s cool that most people I meet when I travel are so awesome and totally patient about it.

Jamie : What I’d recommend then is definitely hit up Tokyo and the big, big cities: Tokyo, Kyoto, Osaka, because there’s going to be more English speakers there and there’ll be a higher chance of just bumping into someone on the street who can speak English and help you out, which is good. But yeah, the place that I went last time, Hirado, it’s really famous for Japanese history. Really important for Japanese history. But the three fishermen that I was speaking to were like, "what’s English?"

Leslie : It’s like, all right, time for Google translate to the rescue.

Jamie : Absolutely.

Well, no, it’s Bing translate.

Leslie : Right? All right. Excuse me. Bing translate, definitely.

Jamie : I’m only messing. Other translators are available, of course. Excellent.

Okay, so when we originally got talking, it was about the C# Dev Kit for VS Code. And I remember, like, just a few moments ago, you were saying that you’ve since moved to a different team from that. So are we still okay to talk about the Dev Kit for VS Code?

Leslie : Of course, yeah. So technically Devkit is still part of my team that I’m on. I just no longer own it; I’ve transferred ownership. But that said, I still talk about it all the time. Like I was just at a conference in December where I talked about it and then November for .NET Conf and ignite. I was talking about it there too. So I consider myself more of a spokesperson for it these days. I also did like several training video series on getting started with it recently. So yeah, I still have ties to it, so no problem at all.

Jamie : Okay, that’s good then because I’m going to be completely honest here. You know the videos that you and Scott Hanselman did for Microsoft learn a while back?

Leslie : ASP .NET?

Jamie : Yeah. I still send those when they’re available. Yeah, I still send those to juniors and people getting into the industry and be like, "you’re going to want to watch these if you want to start learning .NET," because the way that you guys teach that and put that forward, you’re literally starting from. "Okay, so I don’t even have the SDK installed. How do I do that?" Right? Which I think is brilliant.

Leslie : Totally. I think we need more of that. I feel like a lot of the times in conferences and video content and things, we focus so much about the intermediate and advanced levels. I mean tech is such a broad world and there’s so many different aspects of even to just .NET. So I feel like it’s still very important to get to basics because there’s always going to be somebody who’s new to it.

Jamie : Yeah, 100%. And I mean, even if you’re past that basic level, I always say to people, "there’s going to be something that you’ll learn by watching the next level down," I guess. So if you’re at level two, watch something for level one. There’s going to be something that you’ll have missed because maybe you were taught a different way or maybe you were taught you were like self taught or something, right?

Leslie : Absolutely.

So yeah, that’s cool. But that’s cool. That still has, it still blows my mind. People still watch those videos because that was like one of the first pieces of video content I ever did, I think joining Microsoft, it was like within my first year and I was totally freaked out because, yeah, Scott Hanselman approached me out of nowhere. He’s like, "hey, would you like to do this with me?" I’m like, "oh my God. The Scott Hanselman. What?" Yeah, but it was a really fun time to do but it’s cool that it still has that impact years later.

Jamie : Nice.

Yeah, yeah. Like I said, I have this list of resources that I send to juniors and to interns and people at colleges, and that’s in there. The other things that are in there are like books by commUnity authors and stuff that’s not even related to dev work. I always recommend that juniors or people who come to me for mentoring read the book, the Marie Kondo’s konmari method to tidying up, because that’s about SOLID principles without being about computer programming. And Essentialism by Greg McEwen. Because that’s about focusing on the task at hand and having the ability to say no to other things that might get in the way. Because when you’re at the beginning of your career, you may not know how to say those things.

Leslie : Yeah. I mean, to throw in my own book, rec[comendation], I know the book that I give a lot of aspiring product managers, especially, is The Design of Everyday Things by Don Norman I want to say. I really enjoy that think especially. I think that one helped me a lot in my interviews, which is why I tell a lot of interns about it. It just gets you in that headspace of focusing on why certain things are designed the way they are. And it gave me a hatred of doors. Like, doors are horribly designed most of the time. So I think my friends love me when I go on rants about a door when we’re just trying to go to subway.

Jamie : Do you mean the push doors with the pull handles?

Leslie : Is that dreadful? Yeah.

Jamie : It should all just be space-aged doors. We shouldn’t even have to realize they’re there. You walk.

Leslie : Totally agree.

Jamie : Opens itself.

Leslie : Doors make me feel so dumb sometimes. Makes me so mad.

Jamie : Excellent.

Okay. Right. So let’s talk C# Dev Kit for VS Code then. That’s a bunch of words. I guess, what is it?

Leslie : Yeah, so C# Dev Kit, it is a pretty new extension in VS Code. We just [General Availability]’d it back in early October. And it’s an extension that basically enables you to be productive writing C# applications in VS Code.

So prior to this extension existing, we had the OmniSharp-based C# extension, which had been there for years, and that was really the standard extension that you download if you wanted to do anything C# web-app related or .NET-app related inside VS Code. But we wanted to basically expand upon that extension by adding additional tooling support and just overall performance and reliability improvements that have came from customer pain points over the years. So things such as the Solution Explorer from Visual Studio, improved perf and reliability when it comes to how quickly it takes to colorize your code, how quickly it takes to load up or open a file or a solution, stuff like that. And streamlining things such as debugging, which I was probably the most happy about of all the different aspects, adding additional tests and capabilities, all of that jazz, just all of the different things that you’d encounter in your usual development loop to make you productive but in a VS Code context.

Jamie : Right.

When VS Code first came out, I remember I was sitting at my, I think it was my 2019 no, 2016. It didn’t come out in 2016, but I was using my 2016 Mac Air, and I was like, because I started messing around with .NET Core, and I was like, "oh, how am I going to edit the files? Like, I have no integrated development environment on my machine. How am I going to…" And then VS Code came out. I was like, "oh, cool, right? Okay, so I could do dotnet new, and I can open the file. Brilliant." And then I can hit, like, I think it was F5, or maybe it was to bring the command palette and then do run. And it would run it, and I’m like, "this is awesome." And then I throw a large project at it and went, "okay, it’s slightly less awesome."

Leslie : Oh, no. Yeah, that’s out. Yeah. So the goal of C# Dev Kit is to make it so that that doesn’t happen ideally, right?

I can say for myself, I’m usually a Visual Studio person over VS Code. So when I joined the .NET team initially, that was like my first project: to help work on C# Dev Kit, and I was like, "thank God this is happening because, oh, my gosh," anytime I try to go over to VS Code to do my C# stuff, I’d get so annoyed, particularly with debugging. As somebody who likes the debugging tools a lot in Visual Studio, not to have bias or anything, it was so frustrating that I could barely do the basic hit F5 on a hello world app. I’m like, that’s all I’m trying to do. Why is this taking me 20 minutes to figure out how to modify, like, a weird launch settings JSON file and all this stuff that doesn’t work despite reading the documentation. Yeah. So excited to see that we were trying to improve that.

Jamie : I remember I’d gotten a new machine threw the .NET SDK on it, threw Visual Studio Code on it. And this was a couple of years back. And the went and got on a train and I had no cell reception at all, so I couldn’t tether it to my phone. I was like, "okay, right, okay, Visual Studio open." And it’s like, "I can’t download all of these hundreds of things I need to download in order to let you do this." I was like, "well that’s a wasted journey then."

Leslie : Yeah.

Jamie : It would still allow me to do dotnet run on the command line, but debugging in that instance was quite tough because I had to like, "okay, Console.WriteLine("I am here.");Console.WriteLine("I am here.");Console.WriteLine("I am here.");". Which was suboptimal, right?

Leslie : No, not ideal.

Jamie : Okay, so how does the C# Dev Kit for VS Code work then? So it is an extension. So I open up Visual Studio Code, I go to extensions, I type in "C# Dev Kit," it comes up, I install it and then just everything magically works.

Leslie : Yeah, I mean it’s pretty easy to set up. Really? Yeah. Once you have VS Code installed you can go marketplace, check out specifically you want the one that’s called "C# Dev Kit." There is an extension that says "C# extension," but if you want the whole package, C# Dev Kit is the way to go. I lied a little bit when I said it’s an extension. It’s really more of an extension pack.

So with C# Dev Kit you’re getting the C# Dev Kit capabilities which introduce the Solution Explorer. If you’re familiar with Visual Studio for project management and file management, you also get the enhanced testing capabilities and other things like that. And then you get the new and improved C# extension as well, which gets you the improved performance and reliability as well as just additional improvements just across editor productivity. And then you’re also getting the intellicode for C# Dev Kit extension which gives you the ability to have AI based code completions and stuff. And of course all of that is also compatible with Copilot. So if you chose to install Copilot or GitHub Copilot, then you can use that in place of intellicode whole line completions. So whatever floats your boat.

But yeah, so then once you have that extension pack installed, all you got to do is we give you a handy dandy walkthrough that tells you everything you need to get started for the first time. So make sure you have the latest, greatest .NET SDK installed from there, followed by making sure that you have a Microsoft license - I know that’s kind of a prickly topic that I’m not going to go too much into here, but really, as long as you have any form of a Visual Studio subscription, this can include CommUnity. So Visual Studio commUnity is free just heads up there. So then you’re good. You already have an account, a Microsoft account for being able to use C# Dev Kit. And so once you’ve got those two items, just open up cs file or start by creating a new project and you are good to go.


Do you have a WPF application and want to take it to macOS or Linux? Avalonia XPF, a binary-compatible cross-platform fork of WPF, enables WPF apps to run on new platforms with minimal effort and maximum compatibility.

With a few tweaks to your project file, your WPF app and all its dependencies are ready for testing on new platforms.

Start your app transformation journey with a 30-day free trial.

Head over to http://avaloniaui.net/themoderndotnetshow to get started today.


Jamie : Right, okay.

Just to back up what you were saying there about the VS license, there is a commUnity license which is free, but there are certain caveats. So please, everyone listening, do your own due diligence. Read through the options that are available. You may qualify for commUnity, you may not, depending on what you’re doing. I don’t know. I can’t say I’m not a lawyer.

Leslie : Same. Like, for real. The only reason why I’m not going into it further is because I want to keep myself honest. And I feel like I don’t even have the whole 100% almost lawyer-esque things of where you can and can’t use different licenses. So I leave it to you to do your due diligence. But that option is present. The free option is there.

Jamie : Sure. That’s tied to, I guess, the debugger and perhaps Copilot and, and things like that. Right? So like if I don’t, if I don’t have, I mean, maybe you can answer that. Maybe you can’t just go get a. Go get a Visual Studio license, folks. You might get a free one.

Leslie : Yes.

Jamie : That’s the quickest way to answer that one, isn’t it.

Leslie : Exactly.

Jamie : If you currently are doing work for a company that is a Microsoft .NET technology stack shop, you will probably already have a VS license, so you don’t have to go get one. Right?

Leslie : Exactly. There you go. And honestly, if you do have genuine questions about it, you can message me on Twitter. I’m sure I’ll give out my twitter or X handle by the end of this and I can try to direct it to my team where somebody else might know better.

Jamie : Sure. Awesome.

Okay, so I install the VS [Code] extension. I provide any authentication that’s required to make sure I have my license, all that kind of stuff. And then I open a project and bada bing, bada boom? Like I just hit function+F5 if I’m on a Mac or F5 if I’m on a Windows and it just runs?

Leslie : Yeah. So you can either open up an existing project if you’ve got one of those already, or you can open up or create a new project from scratch. And you should be able to hit F5 after at the very least opening a cs file, which is currently a quirk of the debugging process. You usually need to have a file open in order to hit F5. We’re working on streamlining that, so that’s something that you don’t have to do. But yeah, open up a file, hit F5, should be good to go from there.

Jamie : Cool. Okay, so let’s say I’ve got, I don’t know, what if I have multiple projects, right? So let’s say I’m doing ASP .NET, sorry, ASP .NET Core, and I’ve got maybe my web API in one project and perhaps services or some other kind of business logicy stuff. As long as I open the folder, I guess with both the csprojs in, it will work?

Leslie : Yeah. So that’s perfect. So if you want to take advantage of the new Solution Explorer, especially, which is if you’re not familiar, it’s like a filtered way of interacting with all of the different projects that are contained within a solution. Solution being a little file that just acts as a small container representing all the different projects that make up your application. So in your case, if you already had existing projects, but maybe you didn’t have a solution for whatever reason, whether it’s because you’re using something other than Visual Studio, or you just created the projects first and you didn’t have something to contain all of it in, then you could create a new, let’s say ASP .NET project, which could create an empty solution. And the you can add in existing projects directly from the Solution Explorer or the command palette, if that’s your thing: Control+Shift+P is your best friend. So you have that option. Or you can just open up an existing solution that you already have and it should show up in the Solution Explorer window like that. So it’s really all you need to do.

Jamie : Right. Okay, I’ve got another question about project types. But the solution, I realized that we’re in audio format, so obviously this may not work too well and best of luck.

But you said the Solution Explorer is like a filtered view of the list of files. So I use Visual Studio Code a lot for a whole bunch of stuff, but sometimes for I run it. Okay, so the website for the podcast is a statically generated website that uses Hugo, which just uses markdown files. So when I need to add the show notes for a new episode of the show, I open the repo with Visual Studio Code. I right click create new Markdown file, dump the contents in there, git push, and it appears on there. So my file browser view, I guess, or what we will call the Solution Explorer will have, because it’s not C#
, it will have just all the files ever.

So what I’m saying is people who’ve already interacted with Visual Studio Code will recognize this area, sometimes on the left hand side of the screen, depending on how you’ve set up your Visual Studio Code IDE. But let’s say it’s in the default place, which is on the left. It’s got a whole bunch of files in there, your files that you’ve opened. But the Solution Explorer you said was a filtered list. So how is that filtered? Is that like it shows me… because previously I would see, let’s say I’ve got two projects and they’re in separate folders that are next to each other and I have a solution file, then I would see the solution file, two folders, I would have to expand those out to see those files. Maybe there’s a couple of readme files or something. They’re all just scattered about in there. So how does that map to that filtered Solution Explorer that you were mentioning?

Leslie : Yeah. Okay, so by default when you have VS Code installed, you get, I forget the official word for it, I think it’s just called workspace. Right. If you open up a folder containing all of your application contents, then that space is going to contain everything that you’d usually see in the file Explorer if you’re using Windows or Finder, if you’re using Mac. That can include anything from if you already have, again, like a solution file, you could see the SLN file. You can see the csproj files that represent the different properties that make up your project. Other miscellaneous things like .gitignore, and some of these files you may not necessarily care about when you’re doing your regular day to day development for a singular solution.

So that’s when you can take advantage of the Solution Explorer. And the good news is you can choose to use both if you want. There’s nothing telling you you have to use one or the other. But the Solution Explorer is nice because it filters out some of those files that are usually going to be looked at less frequently, like your csproj, your sln, and your .gitignore files in favour of just being able to see the main contents that make up your project. So that doesn’t necessarily just include CS files that can be anything, it’d be razor files, it can be any markdown files that you’ve added to this experience, all of that.

And the Solution Explorer also in addition to that new streamlined layout of your files, also allows you to see the different dependencies that make up a particular project or that a particular project depends on including other projects and NuGet packages that you’ve got installed for a particular solution or project. All of that.

Again, it’s hard to describe without having a visual alongside it, but as an exercise, totally one download Dev Kit. Yeah, if you haven’t already, and then open it up and see the compare and contrast between what you see in the workspace versus what you see in the Solution Explorer.

Jamie : Cool. Okay, so what kind of projects can I throw at the C# Dev Kit for VS Code? Is it quite literally anything that C# can create? So like I’m thinking ASP .NET Core Web API, ASP .NET Core Web UI, Blazer, maybe I’ve got one repo that has a. NET MAUI app in it as well. And perhaps another part of the project is like a console app or something like that. If I have one solution that has all of those things and I throw it at C# for VS Code, what’s going to happen?

Leslie : Yeah, so yes to I think all of those projects that you just mentioned. Yeah, it’s pretty great.

There’s a lot of different project options and also new with C# Dev Kit you also get different project templates to work with as well. So you don’t have to start completely from scratch. So you get access to Blazor apps, ASP .NET apps class libraries. You mentioned MAUI, so there is a separate MAUI extension that is still currently in preview, but I think that might be set to change in the near future. But as long as you have C# Dev Kit installed and you have the MAUI extension installed, then you can do a MAUI app.

There’s also a Unity extension. So if you’re game dev or you’re someone who wants to write a Unity based application, then yeah, you can download the Unity extension. And again, as long as you have C# Dev Kit installed that will also be compatible. So yeah, there’s a lot of different C# based applications that you can do, and of course good old console apps too. Test projects I’ve done test projects before. We’re working on getting Aspire up there. I actually think it’s already there, but it’s still kind of a work in progress since we just started working on that.

So yeah, sky’s the limit.

Jamie : Okay, that’s pretty cool because I feel like, and I certainly do this all the time, a lot of people tend to forget that Unity uses C# in places, so being able to open a Unity code base in Visual Studio Code and do some stuff, that’s pretty cool.

Leslie : Totally agree nice.

Jamie : Okay, so you said there about the project template. So I’ve got the extension installed. I’ve either got a pre-existing solution open or I’ve gone and, "you know what, I’m going to greenfield this and start from the beginning." Can I go file new and get a new project template or is it more a case of dotnet new on the command line?

Leslie : Yeah, so I’m not going to lie, I’m not much of a console person but I think it is possible to do the dotnet new approach. But you can also do it via either directly from the Solution Explorer or you can do Control+Shift+P and.dotnet: new project if you want to get started like that. So there are several ways to get started. All of the are documented in documentation. That’s the good news.

Jamie : Sure.

Leslie : Yeah. But yeah, you got a lot of options depending on what suits you best. Because at the end of the day what we did, if you’re paying attention, you probably will notice that we took a lot of ideas and components from Visual Studio. But that said, we didn’t just copy paste them into VS Code and call it a day. So we tried to integrate those features in with the lightweight VS Code experience that a lot of people love.

Jamie : Right, okay. I mean that makes sense, right?

So I guess there will be at least one person listening to this and I count myself as one of those people sitting here saying, "well okay, so what’s the point of Visual Studio then?"

Leslie : Good question. That is a question that has been asked many times over the years. I will do my best to share why in my opinion at least.

Yeah, I think at the end of the day I don’t personally think it’s a case of having to choose one or the other and calling it a day. There’s many people who use both for different reasons and there’s many people just choose one or the other, and either option is totally cool because they’re both part of the Visual Studio family. That said, so there are a couple main differences between VS Code and VS that you might want to consider.

So first is VS Code, it’s at its core it’s a lot more extension driven. Right? So in order to create that developer experience that you want, chances are you’re going to be installing a lot of extensions in order to get started. And that’s not necessarily a bad thing because some people like to have that fine grained control over what makes up their space. Versus Visual Studio, since it’s an ide first because VS Code at its core is still an editor in order with, sorry. With Visual Studio IDE, you’re getting a lot of those tools that you’d have to install as an extension VS Code right out the gate. So things such as the advanced editing capabilities, you don’t have to worry about installing a specific C#
extension for instance. Having all of those awesome debugging tools, the testing tools, those are all there from the moment you finish installing Visual Studio.

Similarly, you’ve got Visual Studio is tailored towards Windows. That’s why we call it Visual Studio Windows a lot of time because it’s exclusive to Windows, whereas VS Code is obviously not that it’s capable of Windows, Mac, Linux, Codespaces, Dev Boxes or just exists in the cloud, like web browsers. So there’s a lot more opportunities to take your applications with you on the go or depending on whatever your office setup looks like for the day, whether that’s on your rinky dink laptop on a train to Paris or your multi monitored setup in your house. So yeah, there’s a lot more flexibility in being able to take C# with you on the go if you’re using VS Code.

But again, I don’t think one is inherently worse or better than the other. It really just depends on your personal needs. I know for me when I want to. Again, I love the debugging tools in Visual Studio and I think they’re a lot more involved and more advanced in VS than they are in VS Code. So that’s a moment where I might consider moving over to Visual Studio if I wanted to do some heavy debugging stuff. Whereas VS Code it is a lot more lightweight. So if it’s just like, "oh, I’m in a groove where I’m just writing some code and enjoying my day and I don’t necessarily need to take advantage of some of those other tools that exist in Visual Studio right away." Or if I’m in a space that is different from my ideal machine setup, then yeah, I might go the VS Code route. But really there’s not a wrong answer.

Jamie : Cool. Okay.

So you said there about, so there’s the rich debugging and support for testing and things like that. I know that in Visual Studio for Windows, if I have a test project I can right click and say, "run the tests." Or I can go to the test menu and say, "run the tests." Or I can pull up one of the test classes and right click and say, "hey, run the tests." Is it as easy in Visual Studio Code? Like if I’ve got some tests I can just go run the test.

Leslie : Right yeah, it is now with C# Dev Kit. So I know before C# Dev Kit existed, the Test Explorer is a window that exists by default in VS Code. But yeah, you’re already laughing like, "oh yeah."

So it wasn’t very great pre Dev Kit from my understanding, like simple things such as being able to automatically recognize your test once you build your test project. That was not a thing, which blows my mind. I’m like, "but then what are you supposed to do? Just manually add them in? That doesn’t sound fun at all, especially if you’re trying to do the whole test-driven development." You’ve got tests everywhere and it’s like, "well, that’s 50 some tests I have to plug in in. Yippee. I love testing."

Yeah, I can’t imagine that’s a great experience. So thankfully, with C# Dev Kit, we’ve actually made the window functional. I know, bare minimum, but I still think it’s pretty good. So when you build your test projects, it should be able to recognize everything that you have registered as a test via like a test method attribute or whatever kind of test type that you’re using.

So yeah, the Test Explorer, it’s compatible with xUnit, nUnit, MSTest, bUnit, Playwright all the major frameworks that a lot of people use. And from there, once you build your test projects, the Test Explorer will be able to both recognize your test and also display the statuses of each test. And all this is conveniently displayed in a tree view manner. So if you’ve got 20 tests contained in one file of your test project, and then you’ve got another file that has ten tests, then that will be represented in a tree view in the Test Explorer, which is really nice. And of course you can also take advantage of the terminal view if you’re into that. That also has a test panel that I’m blanking on the name of right now, but it’s got test in the title and that will also display all of your different tests and their statuses.

And from there you’ve got a lot of different avenues from which you can run or debug your test. So you can do it via the command palette, you can do it via the Test Explorer directly. You can choose to run or debug a subset of your tests. If you only want to run the tests that failed or for whatever reason the test that passed or something like that, you can do that. And you can also run your test directly within the editor window, which I think is really nice. And I like to use the terminal window view specifically for addressing any tests that fail, because that window gives you a pretty nice display of why your test failed.

And if you still don’t know, that’s when I like to whip out GitHub Copilot, which is getting scarily better and better every day, where at one point I was trying to debug a test. Yeah, I was like, "I don’t know what’s wrong with this test, what am I missing?" And I just copied and pasted the issue that the test was shooting back out at me to Copilot, and it told me what the issue was and it also told me how to address it. So thank you, Copilot, for saving me potential hours of time that I would not have enjoyed.

Yeah, so testing has been buffed up a lot with Dev Kit, definitely.


A Request To You All

If you're enjoying this show, would you mind sharing it with a colleague? Check your podcatcher for a link to show notes, which has an embedded player within it and a transcription and all that stuff, and share that link with them. I'd really appreciate it if you could indeed share the show.

But if you'd like other ways to support it, you could:

I would love it if you would share the show with a friend or colleague or leave a rating or review. The other options are completely up to you, and are not required at all to continue enjoying the show.

Anyway, let's get back to it.


Jamie : So I have to say just real quick on Copilot and such, it’s so cool that part of the tool can help me to do what I need to do, if that makes sense. Because if I get stuck, let’s take your situation there, right? You didn’t have to leave the context of the tooling to go to Google, to go to Bing, to go to the documentation, to go wherever to figure out what the heck was going on. You can just say, "hey, Copilot, you can see my code. Anyway, here’s the error message I got. What the heck, dude?" And it just helps you figure it out, right?

Leslie : Yeah, it’s really good. It’s kind of scary how good it is sometimes.

Jamie : Because I remember that being a big problem. Not a problem, but a thing that I worried about a number of years ago. We tend not to talk about the thing that happened because it’s not a show about the thing that happened. But when we all got sent to our rooms, people who were entering the industry at that point, you didn’t have someone sitting at a desk next to you that you could say, "hey, I’m stuck. Can you help me figure this out?" So you had to jump on Teams; you had to jump on Slack; you had to jump on Zoom, and actually interrupt someone remotely and say, "hey, I’m stuck. Can you help me with this?" Right?

Whereas I feel like with Copilot and the other assistive technologies, I’ll need to caveat this next bit. As long as the company that you work for have a policy which allows you to do this, you can say to those tools, "I’m stuck. Can you act," because that’s why it’s called Copilot, "Can you act as my Copilot? Can you act as my second in command here and help me figure out what’s going on?"

Leslie : Yeah, I appreciate they call it Copilot because while it can help me out 100% sometimes, it’s not always 100%. Right. Leave it to me, the other Copilot, to help fill in the blanks. But, like, great start. I love the whole line completions, or just a whole method completion experience the most. With that, I think it’s really nice. I was putting together a demo series on getting started with C# Dev Kit, which you can watch on YouTube. It’s like eight parts. Check it out if you want to learn more. Shameless plug.

And I was writing a method for, like, a Codle or a Wordle style game that I was using as an example, and I hadn’t written the method yet. And I was writing the method, I had Copilot enabled, and all I did was type in the name of the method, and just based off the name of the method and the context of the rest of my code, it was able to figure out 98% of what I wanted to do. It was like ten lines worth of code. I’m like, "shoot. Okay, well, yeah, that’s exactly what I needed." I think I had to tweak one little thing, but that’s about it.

Jamie : Nice. I was showing someone how interfaces and the implementation of interfaces works in C# a few days ago, and I was in my Visual Studio Code, and I did <code<>public interface IMyInterface or whatever, right? And I started just putting some property names in there, like int ThisIsAProperty { get; set; }, bool ThisIsAnotherProperty { get; set; }, string ITypeThisOutAndItDoesntMakeSense { get; set; }. And then I did—What was the last one I did because Copilot stepped in? So I did something like, oh, yeah bool ThisIsAnExample { get; set; }

And then when I hit return, it auto suggested bool SoYoullAppreciateIt, string SeriouslyThough, bool ThisIsntEvenMyCode, and string ImJustTypingThisToHelp. I was like, "what?! You even get by humuor. What is this?"

Leslie : Right? This is so scary. What is going on?

Jamie : So that was a fun experience for me and this junior to go on.

But yeah, no, it’s really cool and I really appreciate that it has that sort of, that hook into all of those different bits and pieces with the C# Dev Kit and with everything else because it makes us as developers more productive. Right? Because I tell this to people all the time. People get this confused when they start this career. They think, "oh, I’m paid to type code into a computer." And I’m like, "no you’re not. You’re paid to solve the problem. And the code is one of the ways to solve the problem."

Leslie : Right, right. 100%.

Jamie : Obviously, and there’s so much out there that if I didn’t know how to do something, and I’m early in my career, I’m likely to go to stack overflow, go to GitHub, look up how to do it and re-implement it myself. Well, guess what? GitHub Copilot is likely—likely, I don’t know how it works, but it’s likely doing something similar. It has a knowledge base of a bunch of code and it’s able to re implement bits and pieces for you like that. Right. So it just skips out that step.

Leslie : Yep. Yeah, it’s pretty great. I enjoy not having to constantly swap windows, especially when I don’t have a multi monitor set up. Really nice.

Jamie : I appreciate that. There’s a real pain in that, I have to say. I always tell people, "going from multi monitors down to one monitor feels like I’m only working with one arm." Right. It’s like I can’t really explain it, but there’s something missing.

Leslie : Yes, I agree. There are certain corners that I end up cutting because I’m like, "oh, I’m too lazy to open up three different windows right now for this, so we’ll deal with it later."

Jamie : But I just closed my browser.

Excellent. Okay, so let’s have a look. Okay, this is me throwing a curveball here, right? I know it’s the C# Dev Kit for VS Code, but what if I have maybe some GitHub actions or some dockerfiles in there? Does that just effectively hide everything from me or are they showing?

Leslie : Yeah, it should display all of that information. The Solution Explorer and VS Code works the same as Visual Studio really. So in Visual Studio, if you’ve got docker-based content or something like that, then it will display all that information for you. So this should be no different. And if it is different, then please report an issue, because that shouldn’t be the case.

Jamie : Right, okay, so I was just asking for the folks who were like, "yeah, but my project has docker files. What the heck?" Well, we know, right?

Okay, so what about, and this is say I’m on Windows. Say I’ve got Visual Studio Code, and say I’ve got Visual Studio license. For some reason I’m using Visual Studio Code. Maybe it fits my workflow better, maybe it fits the project better, whatever. And I give it a. NET framework app. Is it still going to work or is it modern NET?

Leslie : Net only that’s a bit iffy. Yeah, it was supported with the more modern versions of .NET in mind. So your .NET Core and your .NET 8 and things like that. I mean, you could try it, but I wouldn’t expect all of it to work necessarily.

Jamie : Right, that makes sense, right? That’s cool. Somebody out there will be listening along and think, "hey, I’ll throw my .NET Framework! I’ll throw my WPF! No, I’ll throw my Windows forms .NET 3.5 app at it and see what happens!" There’s nothing wrong with any of those things. It’s just, it’s not designed for it.

Leslie : Right, exactly. I know for certain that if you tried to create a WPF project or Windows forms, I mean, that’s not an option to create a project of with C# Dev Kit, but who knows? Existing could be a different story. So worth a shot anyway.

Jamie : Right. Okay, that’s cool. That’s really cool.

Okay, so I guess as we start to wrap up, and I realize that there will be certain things because things are in motion, things are being developed, you may not be able to talk about a great deal of stuff, but I wonder, is there anything that’s coming down the pipe for the C# for VS—et me get that name correctS—the C# Dev Kit for VS Code. There we go. Got that. I wonder if you know of anything that’s coming along that’s quite interesting that folks may not know about. Is there anything you talk about?

Leslie : Yeah, I can talk about a couple of things.

I know a newest feature if it hasn’t gone out by now, because we usually update the extension every Wednesday. So if you’re somebody who needs the latest greatest bits at all times, tune in on Wednesdays because that’s when we ship the latest version. But I think we recently came out with NuGet restore capabilities and things that wasn’t there previously. Yeah, so that’s a big one that exists.

As for things in the backlog, I mentioned earlier that we’re hoping to further streamline the debugging process by making it so that you don’t have to have a file open in order to hit F5. And we’ve also got just streamlining the getting started experience even further. One of the things that I’m actually still working on, despite technically no longer owning C# Dev Kit all up, is improving the experience of acquiring the latest .NET SDK; because you do need the latest version or a compatible version .NET SDK in order to use C# Dev Kit. Otherwise you wouldn’t be able to actually build your applications, which that’s not fun, right?

But the way the current experience works is that if you’re following along with the embedded VS Code walkthrough that comes with C# Dev Kit, it will usually give you a link that takes you to a web browser in order to go through that installation process with the SDK, which we’re trying to avoid that we’re trying to limit the amount of time you have to swap back and forth between your web browser and VS code. So the goal is to hopefully embed some of that installation stuff within VS Code and not have to go to the web browser if you don’t have.

And then of course there’s other stuff that I’m probably blanking on right now. But the good news is that a large component of this project is open source. So the C# extension piece of it is open source, so you can get involved in adding additional information if you want.

And of course we are always listening to what you have to say or how we could better improve things going forward. So if you go to help and then report issue and VS code, then I highly recommend that you share either your bug or your feature suggestion there because one once you hit submit on that, it will automatically direct the issue to our repository. Real human beings do look at it, I promise. And it’s also really nice to share your issue directly from VS Code because you can also choose to include your system information when you submit the bug or feature request, which is really nice; it saves us all a lot of time. It saves you the time of having to reply back to us when we inevitably ask some of your system info in order to help figure out a problem for you. And that helps us because then we can get to actually trying to help you out faster. So yeah, would recommend it.

Jamie : Yeah, okay. On that, I think.

Leslie : Hot reload. That was the other one. Sorry. Hot reload. Yeah, that’s probably the big one. We’re working on improving that experience. I can’t give you a timeline, but it is in progress, I promise.

Jamie : Sure. Nice. I like that.

Just on that idea of submitting the ideas, the issues, dare I say it, bugs and things like that is just me personally shouting out to the commUnity, if you’re going to do something like that and you can recreate a sort of minimum viable steps and possibly even code to get you to that problem, please do that, too. Because I’ve had people submit bugs for some of my open source stuff in the past where they’re like, "it doesn’t work!" And I’m like, "okay, well, can you give us a little bit more information?"

Leslie : Right.

Jamie : Yeah. And just being able to provide like a minimum repeatable set of steps or a minimum repeatable set of code really kind of helps because it gets you past that, "I have no idea how to debug this," to, "wait. I have some code I can run. I’ve got some steps I can do. I can debug this." Right.

Leslie : Eactly. I feel like it doesn’t do. I understand the need to rant, but it doesn’t do any of us good if you don’t give us specifics.

Jamie : Absolutely. And obviously, it’s important to remember when reporting issues and bugs that it’s other people at the other end. Right.

Leslie : Right. Yeah. There are real humans having to look at this. Yeah. It makes our day when you’re polite and also share helpful information that can, again, help us all out. And honestly, it puts me and the rest of the team in a better mood to want to actually prioritize the issue if it is a big thing. So just a heads up.

Jamie : Excellent.Well, Leslie, it’s been fantastic having you on the show. And I was just know you talked about the Visual Studio Toolbox show and you talked about how you’re on Twitter/X/Whatever-we’re-all-calling-these-days. Because I’m old, I don’t get this concept.

Leslie : I’m still calling it Twitter. Honestly, X is a dumb name. Said it.

Jamie : That’s totally fine.

Yeah, seriously though, folks, I should have said right at the beginning, I forget to do this sometimes, that obviously this is Leslie and I talking as people who are talking, not me talking to Microsoft. Right. This is me talking to Leslie. Leslie is not necessarily representing Microsoft. That was just something I forgot to throw into the beginning. I’m probably going to put that in the intro as well just to make sure that everybody knows. But I thought I’d say it here as well.

And that wasn’t because you said X, just because I realized we got to the end and I hadn’t said it right. So, yeah, Leslie, it’s been fantastic having you on the show, and you did mention earlier on the Visual Studio toolbox show and that you’re on Twitter and things like that. So I wonder, what are some of the things that you create and put out there and how can folks get in touch with you if they have any questions?

Leslie : Yes. So you can get in touch with me on Twitter @lyrichardson01, one that’s just my initials, basically, and then Richardson at the end. Other than that, that’s usually where I hang out. I do my best to try to respond there. I’m really bad at social media if I’m being incredibly honest. But definitely if you send me a direct message if you’ve got a specific question, the I will definitely do my best to answer it on Twitter. Otherwise, yeah, feel free to follow me on YouTube and Twitch on the Visual Studio channel, which I believe is the same name on both Twitch and YouTube. That’s where I host my Visual Studio Toolbox show. I do live episodes. I also do pre-recorded episodes. So if you’ve got any questions about a particular topic that I might have talked about there, you can also feel free to post there as well. And yeah, I think those are my main avenues.

Jamie : Cool. What I’ll do is I will do some work between this recording and when the episode goes out. So then if folks want to watch the eight part series on Visual Studio Dev Kit—sorry"if folks want to watch the eight part series on the C# Dev Kit for Visual Studio, I do apologize. I keep stumbling over the name or any of the other videos. Maybe there’s a Visual Studio toolbox episode that’s about the Dev Kit. Then I’ll put those links into the show notes as well. So if you’re listening along, folks, just press in there and it will open up whatever app you use to do the stuff with. And you can watch the video, right?

Leslie : Yep.

Jamie : Awesome.

Leslie : Awesome.

Jamie : Well, like I said, like I said earlier, leslie, it’s been fantastic to have a chat with you today. I realize I’m fully appreciate that life gets in the way and that means that we weren’t able to do this for a while. But that’s totally cool because we got it done, right?

Leslie : Yes. At the end of the day, it happened and I had a great time. Yeah, it worked out.

Jamie : Excellent. Thank you ever so much.

Leslie : Yeah. Thank you.

Wrapping Up

Thank you for listening to this episode of The Modern .NET Show with me, Jamie Taylor. I’d like to thank this episode’s guest, Leslie Richardson, for graciously sharing her time, expertise, and knowledge.

Be sure to check out the show notes for a bunch of links to some of the stuff that we covered, and full transcription of the interview. The show notes, as always, can be found at the podcast's website, and there will be a link directly to them in your podcatcher.

And don’t forget to spread the word, leave a rating or review on your podcatcher of choice - head over to dotnetcore.show/review for ways to do that - reach out via our contact page, or join out discord server at dotnetcore.show/discord - all of which are linked in the show notes.

But above all, I hope you have a fantastic rest of your day, and I hope that I’ll see you again, next time for more .NET goodness.

I will see you again real soon. See you later folks.

Follow the show

You can find the show on any of these places