Scott Hanselman's Blog - RSS Feed

Scott Hanselman on Programming, User Experience, The Zen of Computers and Life in General

Latest articles

Dotnet could not execute because the application was not found or a compatible .NET SDK is not installed

I ran into this interesting issue where my System PATH environment variables got out of order. I ran "dotnet --version" and saw an error I'd not seen before. Dotnet "Could not execute because the application was not found or a compatible .NET SDK is not installed." What's that? How did I diagnose this? From the command prompt, I typed "where dotnet"...

Shrink your WSL2 Virtual Disks and Docker Images and Reclaim Disk Space

Docker Desktop for Windows uses WSL to manage all your images and container files and keeps them in a private virtual hard drive (VHDX) called ext4.vhdx. It's usually in C:\Users\YOURNAME\AppData\Local\Docker\wsl\data and you can often reclaim some of the space if you've cleaned up (pruned your images, etc) with Optimize-Vhd under an administrator...

ASP.NET Core Diagnostic Scenarios

David and friends has a great repository filled with examples of "broken patterns" in ASP.NET Core applications. It's a fantastic learning resource with both markdown and code that covers a number of common areas when writing scalable services in ASP.NET Core. Some of the guidance is general purpose but is explained through the lens of writing web services....

Differences between Hashtable vs Dictonary vs ConcurrentDictionary vs ImmutableDictionary

I'm very much enjoying David Fowler's tweets, and since he doesn't have a blog, I will continue to share and expand on his wisdom so that it might reach a larger audience. He had a conversation with Stephen Toub where Stephen points out that ".NET has 4 built-in dictionary/map types [and] there’s no guidance on when to use what, mostly individual documentation...

How to make Shared Google Calendars show up on your iPhone and iPad Calendar

My niece just started her MBA at a local university and that uni is a G Suite/Google/Gmail user. Her professors share their class calendars (vs inviting the students to events) so everything is a "Shared with You" shared calendar. That means the events aren't on your primary Google Calendar, they are read-only shares to you. My niece uses an iPhone...

The code worked differently when the moon was full

I love a good bug, especially ones that are initially hard to explain but then turn into forehead slapping moments - of course! There's a bug over on Github called Hysteresis effect on threadpool hill-climbing that is a super interesting read. Hill climbing is an algorithmic technique when you have a problem (a hill) and then you improve and improve...

Implicit Usings in .NET 6

".NET 6 introduces implicit namespace support for C# projects. To reduce the amount of using directives boilerplate in .NET C# project templates, namespaces are implicitly included by utilizing the global using feature introduced in C# 10." NOTE: Did you know that Visual Basic has had this very feature forever? Remember that C# as a language is itself...

How to detect if the User's OS prefers dark mode and change your site with CSS and JS

I got a tweet from Stevö John who said he found my existing light theme for my blog to be jarring as he lives in Dark Mode. I had never really thought about it before, but once he said it, it was obvious. Not only should I support dark mode, but I should detect the user's preference and switch seamlessly. I should also support changing modes if the...

Minimal APIs in .NET 6 but where are the Unit Tests?

Minimal APIs in .NET 6 is great. But where are the Unit Tests?! Often testing is missed or forgotten because it's perceived as difficult or complex. Exploring a minimal Web API with ASP.NET Core 6 A .NET 6 Minimal API Todo example Playground Exploring a minimal WebAPI with ASP.NET Core Easier functional and integration testing of ASP.NET Core applications...

Minimal APIs at a glance in .NET 6

David Fowler doesn't have a blog. I think the psychic weight of having a blog would stress him out. Fortunately, David's 'blog' is actually hidden in his prolific GitHub commits and GitHub Gists. David has been quietly creating  an amazing piece of documentation for Minimal APIs in .NET 6. At some point when it's released we'll work with David to get...

Discover, share and read the best on the web

Follow RSS Feeds, Blogs, Podcasts, Twitter searches, Facebook pages, even Email Newsletters! Get unfiltered news feeds or filter them to your liking.

Get Inoreader
Inoreader - Follow RSS Feeds, Blogs, Podcasts, Twitter searches, Facebook pages, even Email Newsletters!