Search code examples
c#prismdryioc

Error while injecting Serilog "Prism.DryIoc DryIoc.Microsoft.DependencyInjection6.0.0 "


I have this code.

protected override IContainerExtension CreateContainerExtension()
        {
            var serviceCollection = new ServiceCollection();
            serviceCollection.AddLogging(configure =>
            {
                configure.AddSerilog(dispose: true);
            });

            return new DryIocContainerExtension(new Container(CreateContainerRules())
                .WithDependencyInjectionAdapter(serviceCollection));
        }

When I use DryIoc. Microsoft. DependencyInjection 5.1.0 upgrade to DryIoc.Microsoft. DependencyInjection6.0.0,

return new DryIocContainerExtension(new Container(CreateContainerRules())
            .WithDependencyInjectionAdapter(serviceCollection));

I have this error

 "Method not found: 'DryIoc.Rules DryIoc.Rules.WithoutFastExpressionCompiler()"

What should I do? Thank you in advance!


Solution

  • WithoutFastExpressionCompiler is no longer an option in DryIoc v5 and DryIoc.MD.DI v6 per dependency. Prism.DryIoc should adapt. Please open an issue in the Prism repo.