Tags: .NET 5 .NET 6

DO NOT use the Microsoft.Extensions.DependencyInjection namespace for non-official Microsoft packages

At the time of writing this blog post, you could look up the official documentation from Microsoft, and read.

We recommend that apps follow the naming convention of creating extension methods in the Microsoft.Extensions.DependencyInjection namespace.

 At the same time, if you look over here, they say something completely different.

DO NOT use the Microsoft.Extensions.DependencyInjection namespace for non-official Microsoft packages.

So why can't Microsoft agree with themselves, you might ask? I asked them the exact same question. Now, only seven days later they have decided!

DO NOT use the Microsoft.Extensions.DependencyInjection namespace for non-official Microsoft packages

Alloy has been doing it right!