-
-
Notifications
You must be signed in to change notification settings - Fork 234
Description
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