autofac / Autofac.ServiceFabric

Autofac integration for Azure Service Fabric. Provides service factory implementations for Actors, Stateful Services and Stateless Services.
MIT License
26 stars 27 forks source link

MissingMethodException after update to Autofac 5.0.0 #52

Closed cosminjeler closed 4 years ago

cosminjeler commented 4 years ago

Description

Updating Autofac to 5.0.0 (released last day) causes a MissingMethodException with the message:

Method not found: 'Autofac.ContainerBuilder Autofac.ContainerBuilder.RegisterBuildCallback(System.Action`1)'.

The Autofac release notes advertises some changes in the build callbacks.

App type

<TargetFramework>netcoreapp3.0</TargetFramework>
<OutputType>Exe</OutputType>

Relevant assemblies version:

<PackageReference Include="Autofac" Version="5.0.0" />
<PackageReference Include="Autofac.ServiceFabric" Version="2.2.0" />
<PackageReference Include="Microsoft.Diagnostics.EventFlow.ServiceFabric" Version="1.5.1" />
<PackageReference Include="Microsoft.ServiceFabric.Diagnostics.Internal" Version="4.0.457" />
<PackageReference Include="Microsoft.ServiceFabric.Services.Remoting" Version="4.0.457" />

Stack trace:

   at Autofac.Integration.ServiceFabric.AutofacServiceExtensions.RegisterStatefulService[TService](ContainerBuilder builder, String serviceTypeName, Object lifetimeScopeTag)
   at MyApp.Host.IoC.ServiceFabricModule.Load(ContainerBuilder builder) in D:\Sources\MyApp\src\MyApp.Host\IoC\ServiceFabricModule.cs:line 23
   at Autofac.Module.Configure(IComponentRegistryBuilder componentRegistry)
   at Autofac.ContainerBuilder.Build(IComponentRegistryBuilder componentRegistry, Boolean excludeDefaultModules)
   at Autofac.ContainerBuilder.Build(ContainerBuildOptions options)
   at MyApp.Host.Bootstrapper.ConfigureModules() in D:\Sources\MyApp\src\MyApp.Host\Bootstrapper.cs:line 23
   at MyApp.Host.Program.<Main>d__0.MoveNext() in D:\Sources\MyApp\src\MyApp.Host\Program.cs:line 18
tillig commented 4 years ago

Yup, still working through things.

Still TODO

Now that Autofac 5.0 is out, there is still a lot to do. We'll be working on these things as fast as we can:

  • Updating integration packages we support so they ensure compatibility with Autofac 5.
  • Updating the documentation to reflect the above changes.

Some of this is sitting in branches ready to go, other things need to be done now that we have this core package out there.

If your favorite integration isn't ready yet, we're doing our best. Rather than filing "When will this be ready?" issues, consider pull requests with the required updates.