Egil Hansen

Egil Hansen

@egilhansen.com

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

920 followers542 following235 posts

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.

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.comEvolving your C# types without migrating stored JSON | Egil Hansen's .comData 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...

Thanks Stacy.

Stacy Cashmore@stacy-clouds.net

The last couple of days I've been playing with @egilhansen.com's amazing #bUnit. So eay to work with, and I love that you can test both the markup, *and* the razor components that are present (or not) on your rendered component. Fantastic! bunit.dev

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.beAre you writing valuable tests (2025 edition)? – Egil Hansen – HelloStavanger 2025YouTube video by HelloStavanger
.NET@dot.net

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

Egil Hansen reposted

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

Always a please chatting with Carl and Richard on their podcast!

Richard Campbell@richcampbell.bsky.social

You write tests - but are they valuable tests? @EgilHansen.com talks on .NET Rocks at www.dotnetrocks.com/details/1971 about his approach to building tests for applications!

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.orgEgil.StronglyTypedPrimitives 1.9.7A 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 ...

This could be said about the internet in general.

Mike Ginn@shutupmikeginn.bsky.social

its amazing how chatgpt knows everything about subjects I know nothing about, but is wrong like 40% of the time in things im an expert on. not going to think about this any further

@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);

I like the way Rob phrases this, software is free, maintainers time is NOT. I’ll consider this for new projects going forward.

Rob Mensching@robmensching.com

Open Source Software is free, but Open Source Project maintenance is expensive. The Open Source Maintenance Fee directly funds your projects' maintainers. Simple. Sensible. Sustainable. opensourcemaintenancefee.org?utm_source=B...

Another excellent rendition of the #swetugg conference is in the bag. Really great conference; food, venue, organizers, and sessions were all top notch. Big recommendation from me!

FluentAssertions have moved dual license (free for open source/paid for corp work) with their v8, and as expected people are blowing a gasket. Please remember, @dennisdoomen.com and co do not owe you their free time in perpetuity. Stay on v7, buy a license, or move on. Be thankful, don't bitch ❤️

#azure #mvpbuzz friends, if I have an ACA environment with dedicated workload profile, minimum capacity > 2, and zone redundanzy turned on, and I have a container app in the environment with minReplicas > 2, am I then guaranteed to have my container replicas placed equally between the ACA instances?

I.e., will my container app, given there are 2 or more replicas of it running, be guaranteed to stay up, if one of the data centers in my zone redundant setup goes offline? If not, how can I achieve this?

Starting a new Azure project at work and was reminded how long it takes to develop IaC scripts (bicep). The developer-inner-loop is soooo slow, test running the scripts takes minutes, especially when provisioning resources that involve vnets or other networking resources. Tips are welcome!

I see there are a FailureCause being changed according to the interface, but we cannot find a way to observe the FailureCause when using `dotnet run` or `dotnet test`.

“Let’s me build a simple game in #dotnet orleans over the holiday, will be fun to learn” I said. Get hello-world working in a few hours 🙌 Now to deploy to Azure. Let’s use Container Apps. 3 days of yml and bicep later hello world now runs online 🤦 IaC always takes longer than expected.

Compared to aspnet, Orleans doesn't have the plethora of online content and examples, and with the breaking changes from version 3 to 7, things are even more fragmented. I've also managed to run into samples from the official docs that are not upgraded from version 3.x, so that can also trip you up.

Orleans is cool tech, and I think it can make a some of more complex cloud native solutions I build at work easier to maintain and build, so I hope it gets more traction the next couple of years. I will do my part to spread the word!

This triggers me. Troy posts a link to a tweet by somebody other than him on X, folks then demand he makes the content of the tweet thread available to them here because they don't want to go to X or sign in to X 🤦 Don't want to be on X, fine, that's a YOU problem. Not a Troy problem.

Troy Hunt@troyhunt.com

But it *is* publicly accessible! This is what I’m seeing within the Bsky app when clicking that link. Asking me to do more work across yet another platform due to philosophical difference with Elon isn’t the answer.