WireMock.Net 1.11.2 is not compatible with TestContainers 4.7.0 #715

Closed
opened 2025-12-29 08:32:53 +01:00 by adam · 1 comment
Owner

Originally created by @kornysietsma on GitHub (Aug 28, 2025).

Originally assigned to: @StefH on GitHub.

Describe the bug

When running a test with TestContainers 4.7.0 (released today!) we get an error when constructing a builder:

var builder = new WireMockContainerBuilder().WithAutoRemove(true).WithCleanUp(true);

The error is:

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>, System.Collections.Generic.IEnumerable`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`3<DotNet.Testcontainers.Containers.IContainer,System.Threading.CancellationToken,System.Threading.Tasks.Task>, System.Nullable`1<Boolean>, System.Nullable`1<Boolean>)'.
   at WireMock.Net.Testcontainers.WireMockConfiguration..ctor(String username, String password)
   at WireMock.Net.Testcontainers.WireMockContainerBuilder..ctor()

Test to reproduce

  • Update TestContainers version to 4.7.0
  • Call the default WireMockConfiguration constructor

I think the change in TestContainers that broke this might be this commit which changed the command parameter from an IEnumerable<string> to a ComposableEnumerable<string> but that's as far as I've been able to dig.

Originally created by @kornysietsma on GitHub (Aug 28, 2025). Originally assigned to: @StefH on GitHub. ### Describe the bug When running a test with TestContainers 4.7.0 (released today!) we get an error when constructing a builder: ```csharp var builder = new WireMockContainerBuilder().WithAutoRemove(true).WithCleanUp(true); ``` The error is: ``` 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>, System.Collections.Generic.IEnumerable`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`3<DotNet.Testcontainers.Containers.IContainer,System.Threading.CancellationToken,System.Threading.Tasks.Task>, System.Nullable`1<Boolean>, System.Nullable`1<Boolean>)'. at WireMock.Net.Testcontainers.WireMockConfiguration..ctor(String username, String password) at WireMock.Net.Testcontainers.WireMockContainerBuilder..ctor() ``` ### Test to reproduce - Update TestContainers version to 4.7.0 - Call the default WireMockConfiguration constructor ### Other related info I think the change in TestContainers that broke this might be [this commit](https://github.com/testcontainers/testcontainers-dotnet/commit/897dfd30bfbb8ce683ece1217ecc486798379a2e#diff-42f9d6914c9475812b1c918ce9604fc2db0344b779868718675ea7850510b578) which changed the `command` parameter from an `IEnumerable<string>` to a `ComposableEnumerable<string>` but that's as far as I've been able to dig.
adam added the bug label 2025-12-29 08:32:53 +01:00
adam closed this issue 2025-12-29 08:32:53 +01:00
Author
Owner

@StefH commented on GitHub (Aug 30, 2025):

https://github.com/wiremock/WireMock.Net/pull/1357

@StefH commented on GitHub (Aug 30, 2025): https://github.com/wiremock/WireMock.Net/pull/1357
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net#715