Skip to content

WireMock.Net.Testcontainers isn't compatible with Testcontainers 4.17.0 #1546

Closed

Description

@pinkfloydx33

Describe the bug

It's impossible to use latest version of WireMock.Net.Testcontainers (which is 2.31.0 as of 2026-11-20) with TestContainers version 4.17.0 due to a binary breaking change involving the constructor of the ContainerConfiguration. I think its related to this change which changes the connectionStringProvider to a callback+factory.

System.MissingMethodException
Method not found: 'Void DotNet.Testcontainers.Configurations.ContainerConfiguration..ctor(DotNet.Testcontainers.Images.IImage, System.Func`2<Docker.DotNet.Models.ImageInspectResponse,Boolean>, System.String, System.String, System.String, System.String, System.Collections.Generic.IEnumerable`1<System.String>, DotNet.Testcontainers.Configurations.ComposableEnumerable`1<System.String>, System.Collections.Generic.IReadOnlyDictionary`2<System.String,System.String>, System.Collections.Generic.IReadOnlyDictionary`2<System.String,System.String>, System.Collections.Generic.IReadOnlyDictionary`2<System.String,System.String>, System.Collections.Generic.IEnumerable`1<DotNet.Testcontainers.Configurations.IResourceMapping>, System.Collections.Generic.IEnumerable`1<DotNet.Testcontainers.Containers.IContainer>, System.Collections.Generic.IEnumerable`1<DotNet.Testcontainers.Configurations.IMount>, System.Collections.Generic.IEnumerable`1<DotNet.Testcontainers.Networks.INetwork>, System.Collections.Generic.IEnumerable`1<System.String>, System.Collections.Generic.IEnumerable`1<System.String>, DotNet.Testcontainers.Configurations.IOutputConsumer, System.Collections.Generic.IEnumerable`1<DotNet.Testcontainers.Configurations.WaitStrategy>, System.Func`4<DotNet.Testcontainers.Containers.IContainer,DotNet.Testcontainers.Configurations.IContainerConfiguration,System.Threading.CancellationToken,System.Threading.Tasks.Task>, DotNet.Testcontainers.Configurations.IConnectionStringProvider`2<DotNet.Testcontainers.Containers.IContainer,DotNet.Testcontainers.Configurations.IContainerConfiguration>, System.Nullable`1<Boolean>, System.Nullable`1<Boolean>)'.
   at WireMock.Net.Testcontainers.WireMockConfiguration..ctor(String username, String password)
   at WireMock.Net.Testcontainers.WireMockConfiguration..ctor(String username, String password)
   at WireMock.Net.Testcontainers.WireMockContainerBuilder..ctor()
   at MyProject.Tests.Fixtures.WireMockContainerFixture..ctor() in D:\Source\MyProject\test\MyProject.Tests\Fixtures\WireMockContainerFixture.cs:line 13
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Constructor(Object obj, IntPtr* args)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

Expected behavior:

WireMock.Net.TestContainers works with TestContainers 4.17.0

Test to reproduce

  • Use WireMock.Net.TestContainers at version 2.31.0
  • Use TestContainers version 4.17.0

Other related info

Provide additional information if any.

Activity

  1. added
    bug
    on Nov 20, 2026
  2. StefH commented on Nov 20, 2026

    @StefH
    Collaborator

    They broke it again ;-)

  3. self-assigned this
    on Nov 20, 2026
  4. StefH commented on Nov 20, 2026

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

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions