Skip to content
Discussion options

You must be logged in to vote

KernelBuilder is typically just for getting started in an environment that lacks its own DI container. The more typical real-app usage is in ASP.NET or Maui or Azure Functions or some other environment where there is a DI container, in which case you just integrate with that (e.g. the AddKernel extension for IServiceCollection). See https://youtu.be/jrNfKeGSuCg?t=179, and in particular starting at 15:56 (https://youtu.be/jrNfKeGSuCg?t=957). Kernel itself just wraps an arbitrary IServiceProvider, which can come from anywhere. If you use Kernel.CreateBuilder, that's creating a new standalone service collection that's then passed off to the built Kernel when you call Build. If you instead ju…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@CKThompson00
Comment options

Answer selected by sophialagerkranspandey
Comment options

You must be logged in to vote
1 reply
@nguyenlamlll
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants