WireMock.NET TestContainer Dependency Constraint Issue #632

Closed
opened 2025-12-29 08:31:29 +01:00 by adam · 3 comments
Owner

Originally created by @Xor-el on GitHub (Sep 19, 2024).

Originally assigned to: @StefH on GitHub.

Describe the bug

WireMock.Net.Testcontainers 1.6.3 has a hard version dependency constraint on TestContainer 3.9.0 making it difficult to update both TestContainer and WireMock.Net.Testcontainers to their latest version in a project that uses both.

Expected behavior:

I should be able to update the packages to their latest versions without issues.

Test to reproduce

try updating the nuget packages in the project below to their latest versions

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

  <ItemGroup>
    <!--<PackageReference Include="Testcontainers" Version="3.10.0" />-->
    <PackageReference Include="Testcontainers.MsSql" Version="3.9.0" />
    <PackageReference Include="WireMock.Net.Testcontainers" Version="1.5.62" />
  </ItemGroup>

</Project>

referencing the latest TestContainer nuget package (3.10.0 at this time) directly in our project works albeit with some warnings.
unfortunately, this doesn't work for us as we have a strict policy where we treat Warnings as Errors.

Originally created by @Xor-el on GitHub (Sep 19, 2024). Originally assigned to: @StefH on GitHub. ### Describe the bug [WireMock.Net.Testcontainers 1.6.3](https://www.nuget.org/packages/WireMock.Net.Testcontainers) has a hard version dependency constraint on [TestContainer 3.9.0](https://www.nuget.org/packages/Testcontainers/3.9.0) making it difficult to update both TestContainer and WireMock.Net.Testcontainers to their latest version in a project that uses both. ### Expected behavior: I should be able to update the packages to their latest versions without issues. ### Test to reproduce try updating the nuget packages in the project below to their latest versions ```xml <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>net8.0</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> </PropertyGroup> <ItemGroup> <!--<PackageReference Include="Testcontainers" Version="3.10.0" />--> <PackageReference Include="Testcontainers.MsSql" Version="3.9.0" /> <PackageReference Include="WireMock.Net.Testcontainers" Version="1.5.62" /> </ItemGroup> </Project> ``` ### Other related info referencing the latest TestContainer nuget package (3.10.0 at this time) directly in our project works albeit with some warnings. unfortunately, this doesn't work for us as we have a strict policy where we treat Warnings as Errors.
adam added the bug label 2025-12-29 08:31:29 +01:00
adam closed this issue 2025-12-29 08:31:29 +01:00
Author
Owner

@StefH commented on GitHub (Sep 20, 2024):

@Xor-el
I'll check if I can remove the hard dependency on the version from TestContainer.

@StefH commented on GitHub (Sep 20, 2024): @Xor-el I'll check if I can remove the hard dependency on the version from TestContainer.
Author
Owner

@Xor-el commented on GitHub (Sep 20, 2024):

Thanks, @StefH very much appreciated.

@Xor-el commented on GitHub (Sep 20, 2024): Thanks, @StefH very much appreciated.
Author
Owner

@StefH commented on GitHub (Sep 20, 2024):

https://github.com/WireMock-Net/WireMock.Net/pull/1177

@StefH commented on GitHub (Sep 20, 2024): https://github.com/WireMock-Net/WireMock.Net/pull/1177
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net#632