Egil Hansen's Avatar

Egil Hansen

@egilhansen.com

Distinguished Developer at Delegate, Microsoft #MVP and creator of #bUnit. ๐Ÿ‡ฉ๐Ÿ‡ฐ living in ๐Ÿ‡ฎ๐Ÿ‡ธ. Creator of bunit.dev. #dotnet #blazor #bUnit #oss.

902
Followers
536
Following
230
Posts
19.11.2023
Joined
Posts Following

Latest posts by Egil Hansen @egilhansen.com

The Internet Was Weeks Away From Disaster and No One Knew
The Internet Was Weeks Away From Disaster and No One Knew YouTube video by Veritasium

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?...

01.03.2026 13:37 ๐Ÿ‘ 3 ๐Ÿ” 1 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Thanks Stacy.

22.11.2025 14:13 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

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?...

22.11.2025 14:12 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

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.

18.10.2025 10:02 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Show hosts for .NET Rocks Podcast playfully holding mics.
Text reads: Valuable Testing with Egil Hansen

Show hosts for .NET Rocks Podcast playfully holding mics. Text reads: Valuable Testing with Egil Hansen

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

16.10.2025 23:37 ๐Ÿ‘ 6 ๐Ÿ” 2 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 1

They will be very useful in source generator scenarios.

16.10.2025 07:31 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Suffering for your friends I see ๐Ÿ™‚

16.10.2025 07:28 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Oh ffs. Spelling is hard. Pleasure. Itโ€™s a pleasure ๐Ÿ˜†

09.10.2025 19:25 ๐Ÿ‘ 3 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

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

09.10.2025 15:07 ๐Ÿ‘ 5 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

It would ๐Ÿ™‚

07.06.2025 09:42 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

Try LinkedIn, itโ€™s all self-congratulatory posts ๐Ÿ™‚

02.06.2025 05:50 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Iโ€™ve also had good success using this package: www.nuget.org/packages/Mez...

14.05.2025 19:45 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

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.

02.05.2025 10:11 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

@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?

02.05.2025 07:01 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
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...

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...

21.04.2025 13:42 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 1

Yep, saw this live. Huge respect for people that dare to be vulnerable; itโ€™s such a powerful thing.

06.04.2025 09:05 ๐Ÿ‘ 5 ๐Ÿ” 2 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
Preview
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 ...

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.

04.04.2025 23:48 ๐Ÿ‘ 4 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

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...

04.04.2025 13:32 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 1

Congrats Scott. You are living the dream!

28.03.2025 07:38 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

This could be said about the internet in general.

10.03.2025 12:31 ๐Ÿ‘ 3 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
bUnit dev session #28
bUnit dev session #28 YouTube video by Egil Hansen

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

07.03.2025 13:42 ๐Ÿ‘ 2 ๐Ÿ” 1 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Actually, I think I usually do a `git clean -fdx` for a "reset the world" operation.

06.03.2025 22:15 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

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 ๐Ÿ˜Š

06.03.2025 19:56 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 2 ๐Ÿ“Œ 0

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.

06.03.2025 18:49 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

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.

03.03.2025 07:40 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Solve different problems, so itโ€™s like comparing apples and oranges.

02.03.2025 20:34 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

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

01.03.2025 11:23 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0
Preview
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

Itโ€™s not trivial for sure.

@andrewlock.bsky.social has all the details here: andrewlock.net/creating-a-s...

28.02.2025 17:33 ๐Ÿ‘ 4 ๐Ÿ” 1 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

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.

28.02.2025 13:00 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

Thanks, appreciate your efforts here.

28.02.2025 08:11 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0