c # – Do the .NET Core class libraries need to register their own implementations?

The basic ASP.Net documents recommend it

Each services.Add extension method {SERVICE_NAME} adds (and potentially
configure) the services. For example, services.AddMvc () adds the services.
Razor and MVC pages require. We recommended that applications follow this
. Place the extension methods in the
Microsoft.Extensions.DependencyInjection namespace to encapsulate
service registration groups.

But I do not

One of the most boring aspects of configuring plugins is to try to guess the extension method to use to configure them. Or should I say, the version you have because its name seems to change between versions and frameworks

Second, often, these cumulative logging methods do not expose everything you can replace or configure on the underlying services. All the interest of the service manager is to allow you to replace the dependencies when necessary, but the extension method that does it for you can prevent that.

But perhaps more importantly, I do not think this convention is still in force. There seem to be conflicting philosophies regarding startup.cs and program.cs. If you only support one method, you will find yourself on the wrong side of someone else.

I would provide the extension method, but in a separate optional package. Allow users to manually register components as they wish or use the extension method for a default configuration.