Skip to content

Method not found Autofac.ContainerBuilder.Update(Autofac.IContainer) #76

Description

@pippolino

The method Autofac.ContainerBuilder.Update(Autofac.IContainer) has been removed from Autofac v5.0.0 with the message: "Containers should generally be considered immutable. Register all of your dependencies before building/resolving. If you need to change the contents of a container, you technically should rebuild the container. This method may be removed in a future major release."

// Update the root container with a service that can be used to build per tenant container!
ContainerBuilder updateBuilder = new ContainerBuilder();
var defaultServices = options.DefaultServices;
updateBuilder.RegisterInstance(new DelegateActionTenantContainerBuilder<TTenant>(defaultServices, adaptedContainer, configureTenant, containerEventsPublisher)).As<ITenantContainerBuilder<TTenant>>();
updateBuilder.Update(container); /**** HERE ****/

Is it possible to update the "Autofac" method in "ContainerBuilderOptionsExtensions" to be able to use newer versions of the Autofac library?

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions