The Modern .NET Show

S08E13 - The Paper Cuts Microsoft Actually Fixes: A Deep Dive into .NET 10 with Mark J Price

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

S08E13 - The Paper Cuts Microsoft Actually Fixes: A Deep Dive into .NET 10 with Mark J Price
The Modern .NET Show

S08E13 - The Paper Cuts Microsoft Actually Fixes: A Deep Dive into .NET 10 with Mark J Price

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

The episode centred around Mark J Price’s recently published four-book series on .NET 10, covering everything from core language fundamentals with C# 14 to real-world web development, modern apps using technologies like .NET MAUI and Blazor, and essential tooling for professional .NET development. Mark detailed the process of writing the books alongside the release of .NET 10, highlighting Microsoft’s transparency in providing previews and allowing him to incorporate new features as they emerged. He explained the series aims to provide a complete learning path for developers, from beginners to those looking to establish a professional career.

A key discussion point revolved around some of the standout features of .NET 10, with Mark particularly excited about C# 14’s extension members – a long-awaited feature allowing for more flexible and extensible code. He also praised the introduction of file-based applications, allowing developers to run simple .NET code without the need for traditional project files, simplifying the development process and integrating well with tools like Aspire. Mark emphasised the importance of understanding the underlying principles of good code design even with these new features, cautioning against relying solely on the ability to extend types post-development.

The conversation then moved to ASP.NET Core advancements, specifically automatic model validation and improvements within the WebApplicationFactory for integration tests. Mark highlighted how these seemingly small changes contribute significantly to developer productivity by removing common ‘paper cuts’ and allowing developers to focus on writing code rather than resolving repetitive configuration issues. He applauded Microsoft’s focus on addressing these subtle frustrations, creating a smoother and more enjoyable development experience.

The pair discussed the nuances of support durations for .NET releases, addressing a common point of confusion around Long Term Support (LTS) and Standard Term Support (STS). Mark explained the recent extension of STS to 24 months, aiming to encourage more frequent upgrades and access to the performance and security benefits that come with newer .NET versions. Both agreed that maintaining up-to-date runtimes is crucial, even with the convenience of cloud-based hosting which often handles these updates automatically.

Finally, the conversation touched upon the potential of AI-powered tools like Microsoft’s MCP (Model Context Protocol) to assist with debugging and troubleshooting .NET applications. Mark and Jamie expressed excitement about the prospect of leveraging AI to automate common tasks and provide intelligent insights into application behaviour, further streamlining the development workflow and improving overall developer experience.

Episode Transcription

There’s so much that we can talk about with. NET 10 and related things like C# 14. So I’m going to try and focus on a few of the highlights that are personal highlights for me So let’s start with the language actually, C# 14.

- Mark J Price

Hey everyone, and welcome back to The Modern .NET Show; the premier .NET podcast, focusing entirely on the knowledge, tools, and frameworks that all .NET developers should have in their toolbox. I’m your host Jamie Taylor, bringing you conversations with the brightest minds in the .NET ecosystem.

Today, we’re joined by Mark J Price to talk about some of our favourite things in .NET 10 and his new four-part book series on, quite literally, everything .NET. Mark is one of the most prolific authors in the .NET space at the moment, and his new book series is shaping up to be a fantastic resource.

One of the things that I’ve always appreciated with Microsoft and their culture is that they have a very strong requirement that thing things are as backwards compatible as possible.

- Mark J Price

Along the way, we talked about the recent changes to the STS (aka Standard Term Support) lifecycle for .NET, brining more support to the odd numbered versions of .NET and giving companies more time to migrate from one version to the next. We also covered a very important point when it comes to either STS or LTS towards the end of the episode: essentially, keep your runtimes up to date, folks.

This episode marks the fifth appearance of Mark on the show. Mark has been a wonderful collaborator over the years, and long may that continue. We joke about the fact that Mark deserves an award for the guest with the most episodes, but maybe he does deserve an award. Unless someone out there is willing to beat his record, of course.

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 : Mark, it’s been too long since we last chatted. Welcome back to the show. This is your fifth appearance on the show. You definitely deserve an award for this.

Mark : Yes, I’m looking forward to having a pint or a coffee or a Subway sandwich or something with you at some point. We will have to make that happen for sure.

Jamie : Would you mind, Mark, just giving the folks who are listening a brief introduction, just in case they haven’t heard the other four episodes you’ve been on?

Mark : Absolutely. Yes. Thank you very much for inviting me back on, Jamie. It’s always a pleasure to talk with you.

My name is Mark Price. I’ve been developing with Microsoft technologies since Visual Basic back in 1993 when I graduated from university, Bristol University. Go Bristol. I worked for Microsoft Training and Certification Group from 2001 to 2003. So I was working on the teams that were writing the first training courses about Microsoft .NET and worked with the teams who were writing the exams for the certifications around .NET as well.

I’ve spent most of my career in education teaching developers on Microsoft .NET since it was around in 2001. In particular, for the past 10 years, I’ve been an author for Packt.

My best-selling C# and .NET book has just had its 10th edition at the time of recording. It was published two days ago because we’re still actually in the middle of .NET Conf. We’re on day three, I think, now, or it will be starting later. So .NET 10 has officially been released, general availability, a couple of days ago, and my book has been published.

But that’s not the only book that I’m releasing for .NET 10. I’ve actually been working on a four book series, all on .NET 10. The first book covers the core language and runtime fundamentals with C# 14, so that’s the one that’s just been published.

The second book walks through real-world web development using mature technologies like ASP.NET Core MVC and Web API using controllers, as well as looking at third-party things that build on top of that, like Umbraco CMS.

The third book focuses on modern apps and services, so technologies like .NET MAUI and Blazor, as well as ASP.NET Core Minimal API for building web services and GraphQL and gRPC.

Then the fourth book gives developers practical tooling and workflow skills that you need for modern .NET. So covering technologies like Git, doing documentation, covering a lot of the slightly more theoretical academic topics like patterns and practices and principles that you should follow. So that fourth book is a bit more for people who definitely want to have a professional career. So students should benefit a lot from that and help with interviews and getting that job.

Taken together they form a complete path from the absolute basics to real production work. So yeah, that’s a bit about me and a bit about the four books that I’m in the middle of publishing, but hopefully by the time that someone is actually listening to this podcast, all four books should be published and will be available to order and you can start enjoying them straight away.

Jamie : Prolific. That’s the word I’ll use. Prolific. A heck of an undertaking to write effectively a four book series on everything you need to know.

Mark : Yeah, I am feeling absolutely exhausted at the moment just getting that first book out and going through the final edits of the other books.

Luckily, I think I got the order of the books to be published right in the sense that for the first book that covers the language, C#, and the libraries, .NET 10 core libraries, Microsoft is actually really good at providing previews all through this past year, from February until the release candidates in September and October. Microsoft is very public, very transparent.

The new C# features and the core .NET features do tend to become available through those previews. So I am able to write the code, add and expand the topics on that first book while still having a very high-quality book that can publish on the day that .NET comes out.

Whereas what I’ve discovered is that supporting technologies like say Aspire or a lot of the AI technologies and tools within the code editor or your IDE, like Visual Studio 2022, those supporting technologies often have last-minute changes or announcements on the actual day of .NET 10’s release.

So that’s been quite useful in that I’ve still got another month or two to finalise the chapters which are on those new technologies, like for example Aspire 13, which I think most people were expecting, including myself, to be Aspire 10.

It’s been quite interesting to see everyone say, why? Why are we skipping over Aspire 10 and 11 and 12 and going to 13?

From what I can tell, it’s related to the fact that Aspire is now really a polyglot solution to local development. So previously in Aspire 8 and Aspire 9, they were tied to .NET 8 and .NET 9 because they were 100% a .NET local development solution.

Whereas Aspire 13 is designed to be, first of all, drop the .NET branding. So it’s just Aspire rather than .NET Aspire now. The version number really forces a break with the link to .NET. So it is not part of .NET 10. It is not only limited to .NET 10 anymore for JavaScript and Python development as well.

Now of course I’m not going to go into Python and JavaScript in my books. I’m still going to focus on using Aspire for .NET, which in fact apparently is internally what they now describe it if they’re trying to emphasise that it’s the bits which are really focused on .NET. Aspire for .NET rather than .NET Aspire.

Anyway, apparently that was the main reason. Also, why 13? It’s a prime number.

Jamie : We all love prime numbers, don’t we? Yeah. I remember the conversation that happened at .NET Conf. So the conversation happened two days ago, but for the folks listening, it happened months ago.

It went a little bit like this. We need to break from .NET 10, so we can’t call it Aspire 10. We can’t call it Aspire 11 because we don’t want people to think that it’s related to Windows 11. We don’t want to use 12 because 13 is right there and 13 is a prime number. So let’s go with 13.

Mark : Yes. Yes. Yes. Very true. I can just imagine the conversation that the Aspire team were having over the last few months. It’s so typically developer-y type conversation and final decision. But I support it. I like Aspire 13. I think it’s going to be lucky for all of us.

Jamie : Absolutely. It fits with their… How do I put it? Obviously they are a very professional team, but they’re a little tongue-in-cheek in some of their things that they say and do when it’s not a formal setting.

For folks listening, if you haven’t checked it out, they have their own YouTube channel and they do a thing called Aspiry Fridays, where they try to… Aspirey Fri… aspire… aspirify. Sorry, that took me a whole bunch of times to get, but aspirify. Take something and put Aspire behind it, underneath it to support it.

They take an open source project and try to build it with Aspire. Most of the things that they’ve done have only taken a handful of hours to do, and they do it live. Right? You can see them in Visual Studio Code or in Visual Studio working on these things and then they release a pull request and just say, you don’t have to merge it, but here’s all of the work required to put Aspire behind this thing. They’re not all .NET projects, which is amazing.

Mark : Yeah, amazing is absolutely the word. Seeing it all done live, those Aspiro… Aspirify… Aspirify sessions and the ASP.NET Core stand-ups, those are… is it monthly? I think. I’m pretty sure they’re very frequent anyway. I love how transparent the Microsoft teams are these days.

Jamie : Absolutely, absolutely. There was something I want to bring it up just to show a bit of silliness, but maybe it’ll happen. I have no visibility of this. But during the keynote at .NET Conf, they hand it over to Maddy, who is the PM for the Aspire team.

She said, I know this is .NET Conf. This isn’t AspireConf. That might happen or may not. Watch this space. So maybe there’ll be a separate conference just for Aspire. Who knows, right? Who knows what the future holds?

Mark : Yes. Hopefully it happened in December. A Christmas present for us all. Oh, wouldn’t that be lovely?

Jamie : Yeah, all of the new different technologies that .NET either supports or is built with, they’re all absolutely… Obviously, you know, not a lot of people are talking about .NET MAUI at the moment, but things like… It was only a few days ago Avalonia UI announced that they have worked with Microsoft to bring .NET MAUI to the Linux desktop, which was something that I don’t know… I don’t think it was on the roadmap is what I’ll say.

I don’t have… I have no visibility of that team and I’m not internal to Microsoft, but knowing that because it’s a community project, right? All of the .NET stuff. All right, yes, Microsoft takes the ownership of it, but it’s all open source. Yes. So you can just go ahead and create a pull request.

Mark : Yeah, definitely. I think a lot of us .NET developers have been around for a while and have maybe had some slight disappointments over the years with things like Silverlight being abandoned and so on. We were maybe a little sceptical when the official .NET MAUI team was saying, yeah, Linux support is not something we’re going to do. We’re hoping the community will step up to that challenge.

I think a lot of us were thinking, well that probably means it’s never going to happen. So yeah, the joint partnerships with Avalonia and also the Uno platform. I think they’ve done some work with the .NET MAUI team as well. So yeah, the community actually is stepping up because it does seem as if .NET MAUI is important enough to a lot of organisations that it’s worth supporting. Long may that continue.

Jamie : Absolutely. Just to caveat the thing about the Linux on the desktop support, just real quick. For those who don’t know, with Windows and macOS, you have one desktop system. You have the desktop, right? You may install a separate shell in Windows and get a slightly different start menu, but it’s still Explorer. It’s still the desktop, right?

Because Linux isn’t an operating system, it’s the kernel. The distribution is built upon Linux. They’re all opinionated and there is a million different ways to draw a window on screen.

So I can imagine if it was me doing it, I wouldn’t be able to support a billion different operating system configurations. So I fully appreciate why the decision was made to perhaps not have Linux on the desktop on the roadmap, right? Because that requires a whole team of people just to work on that.

I mean, is there really a demand for Linux on the desktop apps with .NET MAUI? I don’t know.

Mark : Maybe there is. One of the decisions that I had to make about the third edition of my Apps and Services book, which covers .NET MAUI and Blazor and those GUI type platforms, was whether I wanted to try and cover other third parties like Avalonia.

So what I have decided… I’m still working on the chapters as we’re recording, but should be published by the time that you get to listen to this podcast. But what I decided to do is to have a chapter about .NET MAUI specifically on mobile development, because that’s really its strength. It’s great at building cross-platform, targeting both Android and iOS. It does that job really well.

Although it can support desktop on Windows and Mac Catalyst, it’s not the best. It’s going to look a little bit ugly.

So what I then decided to do… what’s new in the third edition is I’ve got a brand new chapter on Avalonia for building desktop applications because then it actually looks much better. It can target Windows and Mac and Linux.

You can tell what applications you could build because JetBrains Rider is cross-platform and that’s been built on Avalonia. So you can build absolutely professional, enterprise level applications for the desktop, truly cross-platform, including Linux, using technologies like Avalonia that then runs on top of .NET.

So that new chapter… I’m going to be interesting to see how readers react to that as a choice of, well, here’s my recommendation if you want to do a desktop app rather than trying to force .NET MAUI to do the desktop apps.

Then the third chapter on GUI is Blazor to cover things like Blazor WebAssembly. So those are the three app chapters in that new third edition.

So I was actually really pleased to see that Avalonia is now working with the .NET MAUI team to help them target desktop on Linux. So maybe in the fourth edition, in a year or two, when I update that, maybe that will be stable enough and quite high enough quality that I’ll rewrite that chapter. But we’ll see. I’d love to hear from your listeners as well as my readers what they think about Avalonia.

Jamie : Oh, absolutely. Absolutely. I feel like I’d like to point out just to the listener that obviously what Mark is saying is right. .NET MAUI’s primary focus is mobile app development.

So if you build an app with .NET MAUI and you want to run it on Windows, it will look like a mobile app, right? It will feel like a mobile app because that’s the primary target. You can do it, but do you really want to? I don’t know. That’s up to you and your business and your aims and your goals for your app.

Whereas Avalonia, my understanding, and I’m happy to be corrected either by you Mark or by someone yelling at me in the comments, is that Avalonia is an extension upon the work that WPF put in place. Then making that cross-platform and making that cross-paradigm.

So they’re both coming from slightly different directions, right?

Mark : Yes.

Jamie : .NET MAUI having the Xamarin background and it being focused primarily on how do we run .NET on Android and iOS and make it look all nice and lovely for Android and iOS users?

Then Avalonia having this pedigree of WPF, which was based on how do we build desktop applications that look like desktop applications that allow people to do desktop-y things. Because the paradigms are different, you’re going to have slightly different expectations of how those UIs work.

It comes down to everything, right? It’s pick the right tool in the toolbox for the job you’re trying to do. Which is why we have all these wonderful options. Avalonia, Project Uno, .NET MAUI, even Godot. I’m not sure how you pronounce it, but if you want to use that, you totally can too, right? That’s the whole point.

Yeah, yeah. So we’ve talked a lot about some of the things that are happening with .NET, but I’m just wondering there’s lots of things happening with .NET 10.

By the time the folks will have listened to this, hopefully they’ll have started the process of maybe migrating things over to .NET 10.

There’s a couple of gotchas that I know of, but I was wondering, are there any standout features that make you go, oh my goodness, I don’t know how we did .NET development before this thing happened?

Mark : Yeah, absolutely. There’s so much that we can talk about with .NET 10 and related things like C# 14. So I’m going to try and focus on a few of the highlights that are personal highlights for me.

So let’s start with the language actually, C# 14. As the number suggests, it’s pretty mature now. Most of the low hanging fruit for language features have now already been added. But there are always refinements that can be made.

So my personal favourite for the language is extension members. In particular, the new extension keyword that allows you to create a block, an extension block within a class or other type in order to define new members. Now not just methods, but also properties and constructors and other types of member. That is fantastic.

It’s been something that the team has been debating internally how to implement literally for probably 15 years. So extension methods were first introduced with C# 3. You know, back in what was that, 2006, something like that. So 20 years ago.

It’s taken this long to really come up with the best solution, the best compromise really on how to enable other types of extension member. Particularly properties is probably the one that most people are most interested in.

So by introducing this new extension keyword and extension blocks, that then provides a place where you can specify, well, what do I want to extend?

So when you use the extension keyword, you can then specify, right, I want to extend the string type or the int type or IEnumerable would be a very common one to extend. Then within that block, you can then define your properties and methods and other members. That’s really great. We’ve been waiting for it for such a long time.

They tried to make sure, well they have made sure that it is backwards compatible. One of the things that I’ve always appreciated with Microsoft and their culture is that they have a very strong requirement that things are as backwards compatible as possible.

So if you like and you prefer to use the traditional way of creating an extension method just by using the this keyword on a static method of a static class, you can continue to do that. All your existing code will continue to work. This new extension syntax literally just adds on to that. It’s an alternative that does a lot more.

So I think new developers who are learning it for the first time will probably just use the extension block syntax for all of their extension members. Traditionalists and myself, it’ll probably take me a while to keep remembering that there is a newer way of doing this. But it’s fantastic that the old way still works.

So extension members I’d say is my favourite, but there are some small improvements in the language as well. One that sometimes confuses people is the new null conditional assignment.

So this is the question mark dot type syntax. Now we’ve had that exact character, the combination of a question mark and a dot… a null check on the right hand side of an assignment that’s been there for a few years now.

That allows you to say, well I’ve got this object. This object might be null but it also has this property. So if it’s null, if the whole object is null, I don’t want to throw a null reference exception just because I’m trying to access one of its members, like reading a property.

So if I do object name question mark dot and then the property name, it will either successfully read the property if the object is not null. If it’s null, just return null. So at least you’re not throwing an exception. So that’s worked for a while.

But you can now use that same question mark dot on the left hand side of the assignment. Previously, you wouldn’t be able to do that. So now what it’s really doing is simplifying having to do a null check before you assign something to a property.

So traditionally you’d have to say if you know my object is not null, then go to the object and set its property to something. Now you can just say object question mark dot property name equals and then that entire statement… if the object that you’re trying to assign to is null, it just won’t do anything so it won’t throw an exception.

Now, they could have implemented that null conditional assignment years ago when they did the right-hand side one, but they chose not to because they felt that it required too much knowledge about what was actually going to happen.

Now they feel that C# developers are smart enough, I guess, to be able to choose to use it if they wish to and save a couple of lines of code and not having to do an explicit null check, knowing that no assignment will happen if the object is null.

So that’s a tiny little one, but it could really improve your code in a lot of ways as long as you’re sure that you understand what it’s actually doing or not doing.

Just to go back to extension members, one of the things that I think could be a danger with that, as with all improvements to languages where there are now more ways of doing things, there’s more flexibility in a language, that can also introduce dangers.

Because we can now extend our types with new properties and new methods and new other things, that could lead to the temptation of when you’re initially designing a class or a new type, you might say, well, do I need these properties? Should it have these methods?

It could be tempting to say, well, it doesn’t matter if I’ve missing a few. I can always just extend it later.

So this new feature, as great as it is, for anyone learning the language, I think the teachers need to really stress the importance of discipline and really thinking and planning your types rather than just relying on this ability to extend it later. But we’ll see. We’ll see. It’s nice to always have these new features anyway.

Mark : So for the language I’d say those are some of the more important ones. Then moving on to say the .NET SDK.

So with the SDK, we’ve had over the last couple of years improvements like being able to use top level programs where you don’t need to define an explicit program class with a main entry point method anymore. We can just type in a couple of lines or even just literally one console.WriteLine in a program.cs file and all of the boilerplate code gets created for you.

But you still need to have or needed to have a project file. This XML syntax where you define what target framework you want, whether you’re generating a class library or an executable, controlling things like nullability options and so on. So you’ve always up to this point had to have a project file as well as at least one C# class file.

Now one of the really nice things about the SDK in .NET 10 is that we now have this thing that Microsoft calls file-based apps, or as Maddy has finally learnt to say, file-hyphen-based apps. Because there should be a hyphen between file and based because it’s an adjective that applies to the noun.

But yeah, file-based app. So what does that mean? That means you don’t have to have a project anymore. In fact, the now the new name for the traditional way of doing it is project-based apps.

So file-based apps, you only have to have a C# file. With project-based apps, that’s your traditional where you’ve got a couple of C# files or as many C# files as you like, plus a project file, a csproj file extension.

So file-based apps. The benefit that that gives you is that it’s much simpler. You can literally just create a single file and it doesn’t even have to be called program.cs. You can call it helloworld.cs.

In that file, you could just have one statement, console.WriteLine, for example, and you can now run that at the command line by using the .NET command line interface. So the full command would be dot net… d-o-t n-e-t… dotnet run and then the file name, helloworld.cs.

But the run is actually optional. So you can even cut that out. So just .NET and then the name of the file. It will compile and run that file.

Now, interestingly, that also then makes Aspire much easier to work with as well, because now you could create an Aspire orchestration project without having a project. It could just literally be a single CS file.

That then also fits in with this idea that Aspire 13 and later are polyglot. Because you could have a Python backend, a Node.js frontend… well, Node.js backend as well, perhaps. But no .NET on the backend at all except for a single CS file, which is purely being used to orchestrate all of the other components of your application.

So you literally are using Aspire and just a single C# file in order to then orchestrate a Python and JavaScript and all this other wonderful stuff. No project file required.

It’ll be interesting to see how well that gets adopted. Longer term, the Aspire team has said that they would like to support Aspire with other languages so that even that one orchestration file in the future could be written in Python or JavaScript.

For now it still has to be C#, but combining Aspire 13 with this new file-based apps is a really cool way of the entire .NET team and all these features working together to improve developer productivity, particularly for local development.

Sorry, I’ve been talking for quite a while now.

Jamie : Well, I asked you what your favourite things were and then you told me what your favourite things were.

Mark : Yes. Yeah, yeah, absolutely.

Jamie : Yeah. I think the file-based application stuff. So .NET hello.cs, that’s the game changer, right?

So I have… Related to the podcast actually, I have a whole bunch of JavaScript scripts that I will run. I’ll just do node space the JavaScript file to perform those actions, right? Which is great. It works. It’s fantastic. I’d rather do it with C#, but I can’t.

Now that .NET 10 is out, I can rewrite those scripts in C# and have an almost… it’s not quite but almost a REPL-like experience by just saying hey .NET go run this application for me, run the script for me right?

The majority of the… for the folks who are listening, the majority of the things I do is related to like stripping out certain words and cleaning up transcripts and stuff, right? There are certain keywords that no transcript bot will do properly. So I have a script that just goes load the full transcript and do a find and replace for these particular words.

Which was way easier to do in JavaScript, because I could just do node space file. Now I can rewrite it in .NET and it won’t run any faster. Maybe it will run faster, but I will be more productive because I can rewrite it in .NET.

I will be able to, if I want to, I can then test it. Because I’ll then know, you know, I can throw an xUnit test at it or something. But I would have to spin up a whole thing with the JavaScript ecosystem with like Jasmine or Jest or something to be able to test it. I don’t necessarily need to do that now.

Mark : Yep.

Jamie : Yep. I think it opens up a lot of possibilities for us now. Not just that, but being able to teach too.

So, you know, back when I was at university, people of a certain vintage, the name Rob Miles. He’s a legend. He was literally the lecturer that I had for Computer Science 101, which was taught using C#.

He didn’t touch Visual Studio in his entire lectures. He’d plug a laptop into an overhead projector, which this is 2002, so that was a feat in itself. Then he’d fire up Notepad and just write code.

Then bring up the terminal, do csc, which if you’re on Windows, it still exists. It is the .NET Framework C# compiler. csc, the file, the path to the file he’d just written, which would then spit out an exe, an executable file, and then he’d run that executable file from within the terminal.

That whole thing now becomes one step. Not the whole thing, but that compilation and build step goes from csc.exe space notepad.txt or whatever and then notepad.exe or whatever. It now becomes .NET the file name dot extension, right? It builds and then runs. It’s fantastic.

Mark : Another change which actually isn’t about .NET 10 actually is the support duration of STS releases. So this was actually an announcement before .NET Conf. Sometime in October, I think they made the announcement.

But traditionally, or for the last three or four years, I think it’s been, there have been two levels of support or durations of support. You’ve got long-term support and standard term support. Long-term support was three years and standard term support was 18 months.

The problem with that is that if we imagine that someone is using .NET 10 today, they’ve downloaded it and it’s got three years of support, but then in a year’s time .NET 11 comes out and that’s a standard term support. Because Microsoft alternates. So in even numbered years, you’ve got an LTS release, odd numbered years like 2025 was a long-term support… .NET 10 long-term support. .NET 11 would therefore be a standard term support.

So if you were to upgrade to .NET 11 as soon as it comes out, you used to only have 18 months of support which means that it reaches its end of life before .NET 10. .NET 10 would actually live a little six months longer.

Which means that a lot of organisations therefore said, well, there’s no point in upgrading to an STS release. We might as well stick with the long-term one. They’re losing some of the main benefits.

When I’m asked, you know, what’s new in .NET 10 that’s worth upgrading for, you know, why would I upgrade to the latest version? One of the most important benefits that you get is actually not new features. It’s fun to talk about the new features, whether it’s a language feature or a .NET API, but for organisations, one of the most important improvements is performance and resource usage, memory usage, and so on.

Particularly if you’ve got lots of servers that you’re paying for either in the cloud or physically, if every year the performance and the memory footprint shrinks, or the memory footprint shrinks and then performance improves, then it’s worth upgrading.

So I would very much push internally, if I was working for these organisations, to for an annual upgrade, regardless of the support level.

But anyway, going back to the change that was announced recently, standard term support has now been extended to 24 months, i.e. two years. Which means that when .NET 11 comes out in a year’s time, in November 2026, there’s no longer that excuse to not upgrade.

You might as well upgrade to .NET 11 because it will have… it will end its life two years later, which is the same time that .NET 10 would end its life as well.

So Microsoft’s hoping, and I’m hoping, that therefore there will be more interest in these odd-numbered versions of .NET, .NET 11, .NET 13, and that more organisations will therefore make that leap and gain the benefits.

Even if you don’t care about any new features in .NET 11, it will get better performance. So you can reduce your running costs, as it were, for any .NET targeted platform.

By getting into the habit of doing an annual cycle, you’re going to have far fewer breaking changes as well.

Something that I suspect that a lot of these organisations who have insisted on only targeting long-term support releases is I suspect they push out their production version running on that LTS and then never update the runtime.

Which actually technically means that they are not supported. You’re only supported if you’re updating a runtime every month when the bug fix versions of the runtime come out.

I suspect that the reason they like these long term is because they don’t want to do that work. So if they were doing that work and properly being supported, then it should be relatively easy to then do an upgrade, because they’re effectively upgrading every month anyway.

But, you know, it’s sometimes it’s hard to get the upper management to understand the subtleties of the support.

Have you had any experience with customers or clients or what’s your opinion of LTS versus STS, Jamie?

Jamie : It’s a very, very interesting point of view. So most of the conversations that I’ve had with customers and clients is that they’ve expected the first S in STS to mean short-term support.

So when I said to them, right, you’re on standard term support if you upgrade to this, they… no, no, no. It’s short term, isn’t it? No, no, no, no, no. It’s standard. Right. Long term is long because it’s three years. STS is standard term support.

So I think part of the problem is that because LTS means long-term support, therefore the opposite must mean short-term support. I think maybe there’s a semantic issue there.

I also know that, you know, if you’re hosting an app internally, you have some on-premises server. Yeah, there will likely be almost no work planned for… Right, there’s a new version of the runtime. Let’s go install and run that, right? Yep.

So just as you said, they’re not supported. So they’re on the long-term support, but they’re not actually supported anymore because the runtime isn’t being updated or upgraded to become the supported runtime.

I think there is a misunderstanding. I don’t want to say miscommunication, because I’m not sure it’s a Microsoft thing and I’m not sure it’s a people doing the work thing either. But there is some breakdown in communication of this is what you need to do to maintain support.

I think that comes from people like you and me, Mark, who remember doing .NET Framework things, right? The way the .NET Framework used to work was it was tied to Windows. So when there was an update for .NET, they couldn’t release the update until it was ready to be rolled into Windows Update. So then the runtime would update automatically for you when Windows updates were installed.

That’s no longer the case. Because they can’t, right? Because they can’t… If I was Microsoft and I released a .NET runtime update for Windows 10 and baked it into Windows Update… First off, it’s not a core part of Windows. Secondly, what about the people on macOS? Thirdly, what about the people on all who are running their apps on Linux-based servers, right?

All you’re doing is you’re forcing the update on one subset of people, and then suddenly you go to build and run and it doesn’t work on your Linux server because it’s expecting a slightly older version of the runtime. Yeah, you’re going to break things. There is no win in this other than telling people we need to just jump on the server, run the installer, and it will just keep running. It’s fine.

The app may need to stop for a second whilst the installer is running. Then once the installer is completed, we can start the app again. Don’t even need to reboot, right?

Mark : Yeah, that’s true. Yeah. I’ve seen a lot of problems with this myself recently where, yeah, exactly. There’s a misunderstanding that I don’t need to update the runtime because the runtime will always be updated.

Jamie : But then part of me thinks as well, the same problem exists in the Node ecosystem. They have a similar support structure as well, that similar standard term release and long term release.

I have worked with clients in the past, in the past year, who are running apps on versions of Node that are so far out of date that to say that they had been end of life, I’d have to start a conversation that goes all the way back five, six years, right?

Part of that I think is maybe I don’t want to touch it because I don’t want to break it. Maybe I don’t understand that I need to keep the SDK and the runtime updated. Maybe I also don’t have the, like you said, the time budget allotted to update and upgrade things, which is, you know, suboptimal.

Then I also know that I’ve… because I’ve had a conversation with some of the folks on the security team over at .NET. I’m not going to name any names because some of what they have said is, you know, we’re talking over a tasty beverage.

But part of the big problem with not being able to extend that support lifecycle very far is that at some point you have to stop working on the security upgrades for the runtime and start looking at what does the runtime look like in the next version and how do we support that.

There is a time similar to you or I, wherever we are working or whatever customers we’re working for. There is a time budget, right? There’s only so much time in a week, in a month that I can spend working on certain things.

This is not me saying that nobody cares about security and things like that, but it is a moving target. So there’s only so many hours in the day, there’s only so much budget.

So I fully understand that at some point they need to stop supporting a version and move on to the next one. But my worry is that, again, there’s a miscommunication happening with that too.

I feel as though the majority of .NET devs that I have interacted with, so shall we say, in the last maybe two or three years… They have this feeling of… I… not all of them, but a majority. I install the SDK, I install my IDE, and then when I publish, that’s someone else’s problem.

It’s like, well, it’s not. It’s really not. I know that DevOps exists and people think that DevOps is a job title. It’s not in my opinion. But just because you hand something off to someone, it doesn’t mean it’s no longer your responsibility, right?

You know, those of us with children, this is a proper over-the-top metaphor, but those of us with children. When you take your child to school, that child doesn’t just magically stop being your responsibility. It’s a shared responsibility between you and the school. Then when the child comes home, there is an element of responsibility from the school to make sure that home life is okay.

So it’s like a shared… that whole idea of it takes a village to raise a child, it takes a village to build and maintain a system. It isn’t just one person’s job.

Oh, I’ve got on my soapbox now, Mark. I’m sorry. But yeah, I wonder if maybe that’s it. Because of the magic of the cloud, if you’re hosting on the cloud, you likely don’t realise that the runtime is being updated for you automatically. So you’re always supported.

Mark : Yeah, yeah, that was a… that’s a… yeah, you’re right. Particularly with cloud development or if you’re targeting Azure App Service, you’re right, they’re constantly updating the runtime for you, so you don’t even think about it.

But yeah, if you’re doing self-hosting, then you’re going to have to, even in the cloud, you’re going to have to make sure you do your monthly updates.

Jamie : I mean there are lots of reasons to self-host. You don’t have to just host in the cloud because everybody else is doing it. There may be regulatory reasons, or there may just be a case of I don’t want the added complexity of exposing this to the world.

You know, maybe you want an internal app and you don’t have to worry about VNets and all that stuff. You just want to put this on the server somewhere internally behind a firewall, don’t worry about it, it’s fine. That’s totally legitimate too.

Just wanted to say that it is obviously legitimate and perfectly fine to host things internally. You don’t have to worry about running it on the cloud if you don’t have to. But the benefit there is that they handle the runtime updates for you.

Mark : Yep. Yeah. Yeah, one of the other challenges that I had with deciding how to update my Apps and Services book to its third edition was how to handle any cloud features.

So in the first and second editions of that book for .NET 7 and .NET 8, I had included quite a bit of Azure technology. So Azure SQL Database for the database server in the cloud, Cosmos DB, the document DB type or NoSQL type database, data store, Azure Functions, and so on. So there were quite a few topics about Azure in those earlier editions.

But the feedback that I got from readers is that either they were concerned about cost even just during trying things out in the book. They were saying that, well, I was just going to skip that chapter because I just don’t want to… they haven’t tried it themselves and they’re just worried about cost.

But also just they might have picked some other cloud provider, AWS or Google or someone else, or even just using cloud VMs and therefore managing the actual services within them themselves.

So it did appear to be that only about 5 to 10% of my readers were actually interested in Azure anyway. So I made the difficult decision to take any Azure content out of, at least the paperback, out of the print book and put that old content online.

So it’s still available through the GitHub repositories for those readers who still want to go through that. But certainly Azure has been de-emphasised.

So I’m hoping that all readers will now be able to benefit from therefore having more space to cover built-in .NET stuff in the apps and services book, whilst still not completely losing the Azure content.

Do you have any opinions on how much Azure content should be covered in a .NET book?

Jamie : So here’s the interesting thing, right? We mentioned it earlier on. With Aspire, you don’t need to really worry about how you’re hosting your app.

You know, because my understanding is that they’ve worked with the AWS team, they’ve worked with GCP, they’ve worked with the major cloud providers to have… I’m going to use the wrong words, but like Aspire drivers. That’s not the right word, but like an Aspire provider, right?

Mark : Yeah.

Jamie : So when people ask me, what’s the point of Aspire? I say to them, I use Maddy’s analogy, and she said to me, you know a green base plate you use for Lego? That’s Aspire.

You build your app and you build everything on top of it out of all of the different bits of Lego and you can totally legitimately pull those built parts off of there and go put them on the shelf yourself.

Or since it’s on the green base plate, you can take that green base plate and go over to Azure. You can go over to AWS, you can go over to GCP and take the green base plate with you, Aspire with you, and Aspire will figure out how to host it.

You can take it internally and say, hey Aspire, here’s my server. Go build it and make it deployed over there. Right? Go do the thing.

The goal is, my understanding of the goal, is that it will do that for you. You can say, that’s why the verb for the Aspire command line is do. Aspire do publish. Right. It doesn’t exist, but you could do aspire do the thing, right?

It will package up your application, figure out how to host it so you don’t have to write the YAML, so you don’t have to write the Docker container, so that you don’t have to write the Kubernetes stuff.

You can just say Aspire, I want it to look like this, to behave like this. Wait for this service to be ready. Make sure this external service is ready. Here is the secrets vault with all of my API keys. Substitute things when it starts. Also, go run my thing.

I don’t know. Maybe the next version of the book doesn’t need to mention cloud stuff. Maybe you can say, hey, look, you want to learn cloud stuff? Go read my book that’s got the bits about Aspire in it. Then maybe just do that. I don’t know.

Mark : Or I mean there are plenty of Azure specific books, which you know that everything is about Azure in those books. So it’s just that just because I haven’t written a book about it doesn’t mean that there aren’t plenty of options. Even from other publishers, shock horror.

Jamie : You know, it’s an infinite game, Mark, an infinite game. Everybody wins.


You know that moment when a technical concept finally clicks? That's what we're all about here at The Modern .NET Show.

We can stay independent thanks to listeners like you. If you've learned something valuable from the show, please consider joining our Patreon or BuyMeACoffee. You'll find links in the show notes.

We're a listener supported and (at times) ad supported production. So every bit of support that you can give makes a difference.

Thank you.


Jamie : Because you’ve talked about a few of your favourite things, I just wondered if you’d be interested to hear a few of my favourite things in .NET 10?

Mark : I would love to hear about your favourite things. Especially if you do it to a jaunty tune. These are some of my favourite things.

Jamie : I think we might get a copyright strike if I do that, but I will try. Keep an eye open for a bonus episode, folks. I’m only kidding.

So I think most of mine revolve around the ASP.NET Core, other than the things that you’ve already mentioned. The model validation happening automatically is all wired up for you automatically is wonderful.

I will link to… There’s a blog post by Safia Abdalla who works on many things .NET. Safia talks about how they’re using source generators. Oh yes. I’m going to gloss over the topic here, but essentially if you have a minimal API endpoint, so that’s it, it’s validation on minimal APIs, right?

So you have a minimal API endpoint. You have some object that you’re going to be receiving as part of that request. If in your class definition you throw the validate attributes onto your properties, what will happen is at build time, they will create source-generated files which apply the validation logic to those properties and then perform the validation for you when the request is received.

So all you have to do is is model.valid or is… in a property… is class name, instance of class name.valid. That’s it. You know, it takes away all of that. Because that was one of the biggest complaints, I guess, about minimal APIs when they first started was like, where’s my validation? Why do I… One of those things was why do I have to do the validation myself?

That’s totally fine, right? It’s a valid thing. But also it’s this new thing that happens for you.

The other thing that I really like is if you’ve ever done integration tests using the WebApplicationFactory, right? So the WebApplicationFactory is a type that you can extend in your integration tests. It’s a WebApplicationFactory of type T, right?

The T there is where your program exists. So you’re likely going to type WebApplicationFactory, angle brackets, program, angle brackets. So you’re saying this is a WebApplicationFactory for my program.

Now if you do that with the standard minimal program.cs file where it doesn’t create a public class program and put everything in it, you’ll find you have to scroll all the way down to the bottom of the file and then create a public partial class program, right?

That’s because internally when you’re building your code, the automatically generated program class is internal. So it isn’t visible to anything. So you can either throw public partial class program open squigglies, close squigglies at the bottom of your program.cs. Or you can add the internals visible to attribute, which is fine, but it’s something that you need to remember to do.

Well, ASP.NET Core 10 does that for you. So you don’t have to do the public partial class program squiggly brackets.

The reason I really like this is because I had a conversation with Mads Kristensen earlier on this year about Visual Studio. He said one of the things they really, really like to do is solve those tiny paper cuts. The individual problems that don’t cause a massive amount of issues, but they cause enough issues that it makes you stop and pause and go, wait, what? How do I… wait, how did… how did I solve this before?

Then you have to go spelunking into some other repo or you have to go and ask your AI tooling of choice. So you have to do a Google search. The worst thing to happen is for you to have to step out of the IDE to be able to fix a problem.

This is one of those things. You don’t have to step out of the IDE anymore because the runtime, the build… sorry, not the runtime, the build tools will create this for you.

That’s what… It’s just one of those things that’s like, of course, why didn’t they do this before? This is amazing.

So yeah, that to me is the biggest killer feature of ASP.NET Core 10 is all of this stuff that’s all handled for you because it just makes it easier. I can live in the joy of writing code, right? I don’t fall into the pit of despair. That’s probably the worst way to put it.

I don’t trip over my shoelaces, right, and stumble and drop something because I forgot to put public partial class program at the bottom of my program.cs. It can do it for me, right? That’s the whole point. Automation to automate the boring stuff.

Mark : 100%. It’s so… in the earlier editions of my books, when I’m writing the integration testing chapter for the web service and I had to say to the reader right now we’re going to have to manually create the program class because it’s not public and you have to go through all this… you know, you were talking there for several minutes.

So I had to type out all these instructions and I could just imagine the poor reader saying, why are we doing this? Why can’t it just do it for me? Well now it can. Yep.

So I was able to go back to that chapter when I was updating it and just go delete, delete, delete. Don’t need any of that anymore. It’s all just magically going to work for you, exactly as it should have done from the very beginning.

Yeah, those little paper cuts and fixing all of those. I am so glad that they actually bother because a lot of companies would not bother. They would just have these paper cuts and leave them in for years and years and years.

You only have to listen to an episode of the Accidental Tech podcast with those Apple guys complaining about the documentation and the bugs which never get fixed.

I’m really glad that I have focused on Microsoft and their particularly their developer platforms. The teams at Microsoft are frankly amazing. They are wonderful. They really, really care about every detail.

When things don’t quite work right, you can bet that someone within Microsoft is working on that problem. So yeah, get those annual updates, you’ll get all of these improvements.

Update the runtime.

Jamie : Update the runtime.

Mark : Just like if you haven’t done it.

Jamie : Yes, every month.

Mark : Hey, you’ve already updated it? Check if there’s another update. Just go to get dot dot dot net, which sounds really stupid to say out loud, but if I can Americanise it, get period dot period net. That will take you straight through to the download page for the operating system you’re running, which I think is a fantastic way to do it.

Jamie : Yep, yep, definitely.

Mark : Put it in your calendar. Every month, just go there and check. Or maybe you can… here’s the thing, right? Ha ha. Write a Playwright script. Don’t do this. Because you might end up DDoSing the website. Write a Playwright script that checks the website every two days. If there’s an update, it will tell you, hey, there’s an update. Automate the boring stuff.

Jamie : Absolutely. I was… I haven’t tried this yet myself and bits of it are still in preview anyway at the time of recording.

But I was very excited when Maddy was talking about the Aspire dashboard and its integration with MCP, Model Context Protocol, so that you can then go to your favourite LLM and just say, you know, why is the server down? What’s going on?

It can be talking directly to the dashboard on Aspire and integrating with all of your OpenTelemetry that’s being recorded and explain or fix automatically any problems.

I mean, it’s a very exciting time to be any developer, I suppose, but I think particularly a .NET developer, because the teams are just doing amazing things. It’s very, very exciting time.

Mark : Absolutely. There was a public call that I was watching… so it was one of the Aspirify Fridays, I think it was, where they’d done something. They’d gone through most of the process of setting things up.

Like most developers, they don’t commit till they get to a feature that works, right? But then something stopped working. They’re like, oh no, how do we do it? There’s five people on the call, they’re all shouting over each other, go to this and do this and do that.

They’re all remote, so they’re all talking over each other and you can’t… it’s just a cacophony of noise, right?

Then it was like, well, if I push the MCP button, I can ask the MCP why this didn’t start and it can figure it out for me. Because it has access, like you said, it’s got access to the running application, the dashboard, the logs, the build logs, the runtime log. It’s got access to all of that.

So rather than you going, and I used the phrase earlier on, but rather than you going spelunking through it all, you can ask your LLM of choice, hey, before I go and check, is there anything that looks obvious to you as to why this is broken?

Then it will likely say, yeah, it’s here. Literally go to this file, go to… in fact, don’t go to… I will do it for you, right? I’ll go to the file, I’ll edit it, and then I’ll stop and start. Agentic? Exactly, right?

It just stops and starts the application for you if you need it. It’s fantastic. Because that’s what it is. The AI agents. The reason that we use the noun agent is because it’s something that does something for you.

Similar to a travel agent, right? You want to go travelling, you might go to a travel agent and say, I want to visit here, here, and here in this week period, this calendar week. I’m willing to pay some money, go figure it out, build me an itinerary, figure out my flights, figure out maybe my currency conversion, figure out a hotel for me to stay in, maybe figure out travel between the hotels and the events.

That’s literally what they do, right? That’s why they’re called agents. Because they figure out those minutiae.

So yeah, Mark, it has been yet another fantastic conversation. I’m hoping the folks will have listened to us geek out, nerd out, get excited about .NET 10 and actually start the process if they haven’t already. Start the process of investigating how they can move on.

Just real quick before we leave this actually, I did at the time of recording, I upgraded one of my open source libraries to .NET 10. It was literally a… what… N… a semicolon N-E-T 10.0. So it was an eight-character change. Perfect. That’s all I needed to do. Type in eight characters and then hit build.

It worked because my library targets multiple .NETs, I just had to put a semicolon net10.0, hit save and it was migrated, right? I’m the lucky one in that my code is relatively trivial, so there’s not a lot going on there.

But if you have NuGet packages, you may need to wait for them to upgrade. You may not. Some parts are backwards compatible. Who knows?

But yes, anyway, moving past that, Mark, it has been, as it always is, an absolute pleasure to talk to you.

I’m just wondering in these final few minutes. Would you be able to perhaps remind the listeners of the book titles? Because remember, Mark’s a prolific author. He’s got a lot going on. Go buy his books, folks.

Maybe if you’re on socials or anything like that, if folks want to reach out and say hey Mark, I got a question, or hey Mark, this book is amazing, so they can give you that feedback, right?

Mark : Yes, yes, perfect. Thank you for inviting me again, Jamie. It’s been a great conversation and hopefully valuable for your listeners, as well as maybe slightly entertaining.

So yeah, to summarise, I’ve recently written a four-part or four-book .NET 10 series, starting with C# 14 and .NET 10, Modern Cross-Platform Development Fundamentals, bit of a mouthful.

Then we’ve got the Real-World Web Development with .NET 10. Then we’ve got Apps and Services with .NET 10 and Tools and Skills for .NET 10.

So four books, all updated for .NET 10, and they’ve been published between November and about January 2026, so the last few months.

My publisher Packt has got a Discord server with individual channels for each of those books. So if you want to message me there and have a live chat, that’s great. We have some interesting conversations and I can give feedback and help with anyone who’s maybe struggling a bit with my books.

I also have a GitHub repository, which is probably the best place to keep up to date with my books because you can raise an issue. Each book has its own GitHub repository. You can raise issues there. Let me know if you’ve spotted a typo or there’s a… you are having a problem.

All of the source code for all of the code that I show you in the books is also on those GitHub repositories. The best starting point is my personal GitHub repository, which is just my name, Mark J Price. M-A-R-K-J-P-R-I-C-E. Mark J Price.

That’s my GitHub repository. From there you’ve got links to all of my repos and additional material. So start there and hopefully I’ll see you on the Discord channels.

Jamie : Wonderful. Wonderful. I will have as many links to those things as I can in the show notes. So if you’re listening along, don’t worry about scribbling those things down.

When you have the chance, press, click, whatever paradigm you’re using. You might be watching, listening on YouTube, you may be listening in an app, you may be listening through some other means. Find the show notes, click that and they will be right there.

There will be links to everything in both the full show notes with the full show description and the thing that is displayed in your device right now. So go find those and click those buttons, connect with Mark and go buy his books.

Mark : Thank you again, Jamie. It’s been a pleasure.

Jamie : Thank you ever so much. Always a pleasure, Mark.

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 for graciously sharing their 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 our 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