Sign in

Egil Hansen

@egilhansen.com
916 followers 542 following 235 posts

Independent .NET Developer & Cloud Architect | Microsoft MVP | International Speaker | Open-source developer

PostsRepliesMedia
Egil Hansen @egilhansen.com · 19/06/2026
This is quickly becoming a hill I'm willing to die on. Just because something is created with AI, it does not make it slop or bad quality or a waste of somebody else's time. AI is a tool and if you use it well, you can create high-quality stuff much faster than without.
210
Egil Hansen @egilhansen.com · 11/06/2026
Data models evolve, but the old JSON payloads don't just disappear. They sit in databases and queues or keep arriving over the wire from old clients. Wrote a post on how to handle evolving C# types and data at rest without the headache: egilhansen.com/2026/06/11/e... #dotnet
egilhansen.com
Evolving your C# types without migrating stored JSON | Egil Hansen's .com
Data models evolve, but the JSON payloads serialized from the old shapes do not go away. They sit at rest in databases, document stores, caches, queues, and on disk, and they keep arriving over the wi...
120
Egil Hansen @egilhansen.com · 09/05/2026
Yeah. I do know for certain that the env vars I mention in my blog post did the trick in my machine, so you can as them in, in case you have not already.
000
Egil Hansen @egilhansen.com · 08/05/2026
Cool. It did happen from time to time. Mostly been using Copilot CLI, from VSCode, Rider, and VS, as well as Codex (desktop app) on Windows. Pretty up to date package references too. Good with OOB support from you though.
100
Egil Hansen @egilhansen.com · 08/05/2026
A trick for making @simoncropp.bsky.social’s Verify play nice with AI agents: egilhansen.com/2026/05/05/v...
egilhansen.com
Verify snapshot tests and AI agents: disable the diff tool | Egil Hansen's .com
I use Verify for snapshot testing in .NET projects. It is great, but there is one annoying edge case when an AI agent runs the test suite: a snapshot mismatch can make Verify ask DiffEngine to open my...
120
Egil Hansen @egilhansen.com · 01/03/2026
This video does a great job covering the good and bad sides of open source software. The researcher from Microsoft gets a lot praise for discovering the hack, but the real hero is the sole developer from Finland who has been supporting the XZ library for free for 20 years: youtu.be/aoag03mSuXQ?...
youtu.be
The Internet Was Weeks Away From Disaster and No One Knew
YouTube video by Veritasium
031
Egil Hansen @egilhansen.com · 22/11/2025
Thanks Stacy.
120
Egil Hansen @egilhansen.com · 22/11/2025
Want more of this? Back in October, I did a presentation on this exact topic at @hellostavanger and it covers a bunch of extra details and examples we didn’t get to in the podcast: youtu.be/yT1ckNTCW60?...
youtu.be
Are you writing valuable tests (2025 edition)? – Egil Hansen – HelloStavanger 2025
YouTube video by HelloStavanger
010
Egil Hansen @egilhansen.com · 18/10/2025
Yeah I’ve lost countless hours to build pipelines. Custom images/runners is the way to go. Basically docker image that runs your pipeline scripts. Then you have much more control over things.
010
Reposted by Egil Hansen
.NET @dot.net · 17/10/2025
You write tests. But are they helping you and your team? In this .NET Rocks! episode, @egilhansen.com explores how to make tests more durable, insightful, and future-proof. Plus: should AI be writing your tests? 🤖 #dotnet 🎧 Listen here: msft.it/63323sFo2T
Show hosts for .NET Rocks Podcast playfully holding mics.
Text reads: Valuable Testing with Egil Hansen
062
Egil Hansen @egilhansen.com · 16/10/2025
They will be very useful in source generator scenarios.
010
Egil Hansen @egilhansen.com · 16/10/2025
Suffering for your friends I see 🙂
020
Egil Hansen @egilhansen.com · 09/10/2025
Oh ffs. Spelling is hard. Pleasure. It’s a pleasure 😆
030
Egil Hansen @egilhansen.com · 09/10/2025
Always a please chatting with Carl and Richard on their podcast!
150
Egil Hansen @egilhansen.com · 07/06/2025
It would 🙂
110
Egil Hansen @egilhansen.com · 02/06/2025
Try LinkedIn, it’s all self-congratulatory posts 🙂
000
Egil Hansen @egilhansen.com · 14/05/2025
I’ve also had good success using this package: www.nuget.org/packages/Mez...
120
Egil Hansen @egilhansen.com · 02/05/2025
I am more thinking about what to snapshot test and what not to snapshot test. E.g., a rule I try to follow is to not include irrelevant (to the test) data in the snapshot, as it makes it harder to validate the snapshot when it changes.
100
Egil Hansen @egilhansen.com · 02/05/2025
@simoncropp.bsky.social do you have a list of does and donts in snapshot testing somewhere? Examples of good patterns and anti patterns with Verify?
100
Egil Hansen @egilhansen.com · 21/04/2025
If the facts are as the article lays them out, I hope one of my friends from #microsoft will make this right. Adherence to OSS licenses is important! philiplaine.com/posts/gettin...
philiplaine.com
Getting Forked by Microsoft
Three years ago, I was part of a team responsible for developing and maintaining Kubernetes clusters for end user customers. A main source for downtime in customer environments occurred when image reg...
100
Egil Hansen @egilhansen.com · 06/04/2025
Yep, saw this live. Huge respect for people that dare to be vulnerable; it’s such a powerful thing.
142
Egil Hansen @egilhansen.com · 05/04/2025
Need a cure for that primitive obsession in #dotnet? Take a look at www.nuget.org/packages/Egi... First real attempt at a source generator library. Happy with the result. A key feature is that it’s very easy to overwrite the default generated code, just as it is with C# record classes and structs.
nuget.org
Egil.StronglyTypedPrimitives 1.9.7
A source generator for creating strongly-typed primitive types that makes it easy to avoid the primitive obsession anti pattern. Add a [StronglyTyped] attribute to a partial record struct ...
130
Egil Hansen @egilhansen.com · 04/04/2025
Going live with @steven-giesel.com for the first #bUnit dev session of this month. We may even get a visit from @scottsauber.com :) Join at twitch.tv/egilhansen and www.youtube.com/watch?v=jZrZ...
000
Egil Hansen @egilhansen.com · 28/03/2025
Congrats Scott. You are living the dream!
000
Egil Hansen @egilhansen.com · 10/03/2025
This could be said about the internet in general.
020
Egil Hansen @egilhansen.com · 07/03/2025
Hey folks, @steven-giesel.com and I just went live with another #bunit dev session. Come hang and lets build v2 together. www.youtube.com/watch?v=fvBn... and twitch.tv/egilhansen
youtube.com
bUnit dev session #28
YouTube video by Egil Hansen
011
Egil Hansen @egilhansen.com · 06/03/2025
Actually, I think I usually do a `git clean -fdx` for a "reset the world" operation.
010
Egil Hansen @egilhansen.com · 06/03/2025
There is a git command that does it, just can’t remember it when I need it, so have to search the web. If your tool had a -all option that would be great 😊
200
Egil Hansen @egilhansen.com · 06/03/2025
Could it also have an option that does the same a clean git clone? Sometimes deleting e.g., the .vs folder helps with weirdness in vs.
100
Egil Hansen @egilhansen.com · 03/03/2025
By using Aspire and related client libraries you get basic telemetry out of the box (without solution specific context), so I’ll do that and then add some/few end-2-end tests for basic protection against regressions.
010
Egil Hansen @egilhansen.com · 02/03/2025
Solve different problems, so it’s like comparing apples and oranges.
100
Egil Hansen @egilhansen.com · 01/03/2025
@captainsafia.com does (or will) #dotnet's OpenApi generator have a way to declare a custom schema transformer for type as an attribute, like we can with JsonConverter? E.g.: [OpenApiTransformer<MyIdSchemaTransformer>()] public record MyId(int Value);
110
Egil Hansen @egilhansen.com · 28/02/2025
It’s not trivial for sure. @andrewlock.bsky.social has all the details here: andrewlock.net/creating-a-s...
andrewlock.net
Creating an incremental generator: Creating a source generator - Part 1
In this post I walk through how to create a practical .NET 6 incremental source generator: an enum extensions class with a fast ToString() implementation
041
Egil Hansen @egilhansen.com · 28/02/2025
They do, but we have something called incremental generator, that ensures a generator only runs when the code it’s targeting has changed, so that helps quite a bit. @captainsafia.com can speak to this quite a bit better than I can.
100
Egil Hansen @egilhansen.com · 28/02/2025
Thanks, appreciate your efforts here.
000
Egil Hansen @egilhansen.com · 28/02/2025
I’ve been working on a source generator last weekend and borrowed some of your snapshot test helper code from your open API generator. It would be awesome if you would post the newest version of that in a gist/blog with a bit of code comments for us source gen newbies to understand it better 😊
100
Egil Hansen @egilhansen.com · 27/02/2025
Ugh those build times thought. Lots of coffee breaks for you I see :)
100
Egil Hansen @egilhansen.com · 27/02/2025
in my case if I were to scale down my job to part time (can’t scale family time down) to spent more time maintaining and extending my OSS projects, if I want to keep the same income level. 2/2
100
Egil Hansen @egilhansen.com · 27/02/2025
Correct, at least for bUnit I’ve been lucky to get co maintainers on board and the amount of work we have to do is manageable. The problem is at the end of the day a lack of time. Full time job + full time family doesn’t leave a lot of spare time to OSS. Founding would need to be significant 1/2
100
Egil Hansen @egilhansen.com · 27/02/2025
I big one is also the feeling of responsibility, implicit promises made (in my mind at least), not wanting to change things on existing users, and potential loss of reputation, all of that weighted against expected “income”.
110
Egil Hansen @egilhansen.com · 27/02/2025
Why not add to existing projects? Not sure I have a good answer, yet at least. Have to give the site a proper read through, make sure all implications are understood, cost/benefit analysis, etc.,
110
Reposted by Egil Hansen
Rob Mensching @robmensching.com · 26/02/2025
For all the Open Source Maintainers, a message to the world.
094
Egil Hansen @egilhansen.com · 26/02/2025
I like the way Rob phrases this, software is free, maintainers time is NOT. I’ll consider this for new projects going forward.
100
Egil Hansen @egilhansen.com · 21/02/2025
Hey #dotnet, #blazor, and #bunit friends, me and @steven-giesel.com are live with another bUnit dev session. Come join us on www.youtube.com/watch?v=Nw68... and twitch.tv/egilhansen.
youtube.com
bUnit dev session #27
YouTube video by Egil Hansen
082
Egil Hansen @egilhansen.com · 18/02/2025
media.tenor.com
a picture of two dogs with the word nudge written above them
ALT: a picture of two dogs with the word nudge written above them
110
Reposted by Egil Hansen
Aleksander Paradziński @akjp89.bsky.social · 15/02/2025
A solid analysis by @anderspucknielsen.dk cutting through the media buzz created by Trump and co and providing a reasonable assessment. www.youtube.com/watch?v=TWLq...
youtube.com
Trump's plan for peace negotiations
YouTube video by Anders Puck Nielsen
515128
Egil Hansen @egilhansen.com · 13/02/2025
What language are you programming in and what are you building?
000
Egil Hansen @egilhansen.com · 11/02/2025
True. Even so, do you really need more than 240/280mm rad even for Intels hottest 13th gen CPUs, even under sustained loads? Or are you overclocking too?
100
Egil Hansen @egilhansen.com · 11/02/2025
But isn’t a 280mm or even 240mm enough to cool those CPUs? Check out youtube.com/@optimumtech Fair warning. It’s a rabbit hole once you get into SFX builds, but it’s very satisfying.
youtube.com
optimum
PC hardware and peripheral fanatic.
100
Egil Hansen @egilhansen.com · 10/02/2025
I am big fan of small form factor builds. In most cases (no pun intended) you don't need such a large case, e.g. a 15-20L case is big enough and quite easy to build in too, without any compromises on performance. Have you looked in that direction?
100