Upgrade YamlDotNet dependency #733

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

Originally created by @extrmi on GitHub (Dec 18, 2025).

Originally assigned to: @StefH on GitHub.

Is your feature request related to a problem? Please describe.
I'm using WireMock.Net in an integration test project with WebApplicationFactory. The WebApplicationFactory points to the Program.cs of the Api project. The Api project relies on newest NSwag.AspNetCore (14.6.2) for generating OpenApi spec. Standard stuff.

When running the test in Azure DevOps a reflection error occurs

System.Reflection.ReflectionTypeLoadException : Unable to load one or more of the requested types.
Method not found: 'Boolean YamlDotNet.Serialization.INodeDeserializer.Deserialize(YamlDotNet.Core.IParser, System.Type, System.Func`3<YamlDotNet.Core.IParser,System.Type,System.Object>, System.Object ByRef)'.
Stack Trace:
at System.Reflection.RuntimeModule.GetTypes(QCallModule module, ObjectHandleOnStack retTypes)
at System.Reflection.RuntimeModule.GetTypes(QCallModule module, ObjectHandleOnStack retTypes)
at System.Reflection.RuntimeModule.GetTypes()

Notice that the method it's looking in YamlDotNet for has 4 parameters, exactly how it looks in v.8.1.0 (5 years-old version) that WireMock.Net.OpenApiParser uses (https://github.com/aaubry/YamlDotNet/blob/v8.1.0/YamlDotNet/Serialization/INodeDeserializer.cs), newer versions have 5 parameters (https://github.com/aaubry/YamlDotNet/blob/master/YamlDotNet/Serialization/INodeDeserializer.cs).

Describe the solution you'd like
Upgrade YamlDotNet reference from 8.1.0 to newest 16.3.0 in https://github.com/wiremock/WireMock.Net/blob/master/src/WireMock.Net.OpenApiParser/WireMock.Net.OpenApiParser.csproj

Originally created by @extrmi on GitHub (Dec 18, 2025). Originally assigned to: @StefH on GitHub. **Is your feature request related to a problem? Please describe.** I'm using WireMock.Net in an integration test project with `WebApplicationFactory`. The `WebApplicationFactory `points to the `Program.cs `of the Api project. The Api project relies on newest NSwag.AspNetCore (`14.6.2`) for generating OpenApi spec. Standard stuff. When running the test in Azure DevOps a reflection error occurs ``` System.Reflection.ReflectionTypeLoadException : Unable to load one or more of the requested types. Method not found: 'Boolean YamlDotNet.Serialization.INodeDeserializer.Deserialize(YamlDotNet.Core.IParser, System.Type, System.Func`3<YamlDotNet.Core.IParser,System.Type,System.Object>, System.Object ByRef)'. Stack Trace: at System.Reflection.RuntimeModule.GetTypes(QCallModule module, ObjectHandleOnStack retTypes) at System.Reflection.RuntimeModule.GetTypes(QCallModule module, ObjectHandleOnStack retTypes) at System.Reflection.RuntimeModule.GetTypes() ``` Notice that the method it's looking in YamlDotNet for has 4 parameters, exactly how it looks in `v.8.1.0` (5 years-old version) that `WireMock.Net.OpenApiParser` uses (https://github.com/aaubry/YamlDotNet/blob/v8.1.0/YamlDotNet/Serialization/INodeDeserializer.cs), newer versions have 5 parameters (https://github.com/aaubry/YamlDotNet/blob/master/YamlDotNet/Serialization/INodeDeserializer.cs). **Describe the solution you'd like** Upgrade YamlDotNet reference from `8.1.0` to newest `16.3.0` in https://github.com/wiremock/WireMock.Net/blob/master/src/WireMock.Net.OpenApiParser/WireMock.Net.OpenApiParser.csproj
adam added the feature label 2025-12-29 08:33:08 +01:00
adam closed this issue 2025-12-29 08:33:09 +01:00
Author
Owner

@StefH commented on GitHub (Dec 19, 2025):

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

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

No dependencies set.

Reference: starred/WireMock.Net#733