InvalidProgramException when following running as standalone process example with dotnetcore #166

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

Originally created by @pmiossec on GitHub (Mar 26, 2019).

When following the "WireMock as a standalone process" example "Option 3" on dotnetcore, I had the exception InvalidProgramException: Cannot create boxed ByRef-like values. when doing the Json.Convert().

It's an already fixed bug in the version 11.0.2 of the NewtonSoft.Json nuget package coming as a dependency of WireMock.Net.StandAlone.

The solution is to update to a more recent version of the NewtonSoft.Json dependency
Version 12.0.1 is fixing the problem.

Originally created by @pmiossec on GitHub (Mar 26, 2019). When following the ["WireMock as a standalone process" example "Option 3"](https://github.com/WireMock-Net/WireMock.Net/wiki/WireMock-as-a-standalone-process#option-3--coding-yourself ) **on dotnetcore**, I had the exception `InvalidProgramException: Cannot create boxed ByRef-like values.` when doing the `Json.Convert()`. It's an [already fixed bug](https://github.com/JamesNK/Newtonsoft.Json/issues/1757) in the version `11.0.2` of the `NewtonSoft.Json` nuget package coming as a dependency of `WireMock.Net.StandAlone`. **The solution is to update to a more recent version of the `NewtonSoft.Json` dependency** Version `12.0.1` is fixing the problem.
adam added the invalid label 2025-12-29 08:23:16 +01:00
adam closed this issue 2025-12-29 08:23:16 +01:00
Author
Owner

@pmiossec commented on GitHub (Mar 26, 2019):

Closing because this issue is just for documentation purpose for newcomers (see solution above)

@pmiossec commented on GitHub (Mar 26, 2019): Closing because this issue is just for documentation purpose for newcomers (see solution above)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net#166