Wiremock not compatible with Newtonsoft.Json ver 11.0.2 #180

Closed
opened 2025-12-29 08:23:30 +01:00 by adam · 9 comments
Owner

Originally created by @ashby-bowles on GitHub (Jun 10, 2019).

In our project we are using Xamarin UI tests which locks us to Newtonsoft ver 11.0.2 and we are running into an error when the MockServer is started. The exception is below. We have attempted to use an explicit reference to a newer reference of Newtonsoft but this does not help. Any guidance would be greatly appreciated.

WireMock.Exceptions.WireMockException : Service start failed with error: One or more errors occurred. (Could not load file or assembly 'System.IO.Pipelines, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.)
  ----> System.AggregateException : One or more errors occurred. (Could not load file or assembly 'System.IO.Pipelines, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.)
  ----> System.IO.FileNotFoundException : Could not load file or assembly 'System.IO.Pipelines, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.
Originally created by @ashby-bowles on GitHub (Jun 10, 2019). In our project we are using Xamarin UI tests which locks us to Newtonsoft ver 11.0.2 and we are running into an error when the MockServer is started. The exception is below. We have attempted to use an explicit reference to a newer reference of Newtonsoft but this does not help. Any guidance would be greatly appreciated. ``` WireMock.Exceptions.WireMockException : Service start failed with error: One or more errors occurred. (Could not load file or assembly 'System.IO.Pipelines, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.) ----> System.AggregateException : One or more errors occurred. (Could not load file or assembly 'System.IO.Pipelines, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.) ----> System.IO.FileNotFoundException : Could not load file or assembly 'System.IO.Pipelines, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. ```
adam added the invalidquestion labels 2025-12-29 08:23:30 +01:00
adam closed this issue 2025-12-29 08:23:30 +01:00
Author
Owner

@StefH commented on GitHub (Jul 3, 2019):

Can you provide an example project ?

@StefH commented on GitHub (Jul 3, 2019): Can you provide an example project ?
Author
Owner

@ashby-bowles commented on GitHub (Jul 23, 2019):

@StefH here it is. let me know if you need any more info.

BugRepro.zip

@ashby-bowles commented on GitHub (Jul 23, 2019): @StefH here it is. let me know if you need any more info. [BugRepro.zip](https://github.com/WireMock-Net/WireMock.Net/files/3423824/BugRepro.zip)
Author
Owner

@StefH commented on GitHub (Jul 24, 2019):

I cannot open the iOS project on my system, can you maybe also create an android version?

@StefH commented on GitHub (Jul 24, 2019): I cannot open the iOS project on my system, can you maybe also create an android version?
Author
Owner

@ashby-bowles commented on GitHub (Jul 24, 2019):

@StefH here you go
BugReproAndroid.zip

Here are the repro steps:

  1. Build the solution
  2. Make sure you use an up to date Android emulator (ie: Pixel 2 or similar)
  3. Run the unit test
@ashby-bowles commented on GitHub (Jul 24, 2019): @StefH here you go [BugReproAndroid.zip](https://github.com/WireMock-Net/WireMock.Net/files/3426820/BugReproAndroid.zip) Here are the repro steps: 1. Build the solution 2. Make sure you use an up to date Android emulator (ie: Pixel 2 or similar) 3. Run the unit test
Author
Owner

@StefH commented on GitHub (Jul 26, 2019):

I'm sorry.

I cannot get Xamarin + Android working in my VM
Memory is not enough it seems, and I get an error while running test:

System.Exception : ApkFile or InstalledApp has not been configured.
   at Xamarin.UITest.Configuration.AndroidAppConfiguration.Verify()
   at Xamarin.UITest.Android.AndroidApp..ctor(IAndroidAppConfiguration appConfiguration, IExecutor executor)
   at Xamarin.UITest.Configuration.AndroidAppConfigurator.StartApp(AppDataMode appDataMode)
   at XamarinUIWireMockAndroidBug.UITests.Tests.BeforeEachTest()

Closing this issue.

@StefH commented on GitHub (Jul 26, 2019): I'm sorry. I cannot get Xamarin + Android working in my VM Memory is not enough it seems, and I get an error while running test: ``` System.Exception : ApkFile or InstalledApp has not been configured. at Xamarin.UITest.Configuration.AndroidAppConfiguration.Verify() at Xamarin.UITest.Android.AndroidApp..ctor(IAndroidAppConfiguration appConfiguration, IExecutor executor) at Xamarin.UITest.Configuration.AndroidAppConfigurator.StartApp(AppDataMode appDataMode) at XamarinUIWireMockAndroidBug.UITests.Tests.BeforeEachTest() ``` Closing this issue.
Author
Owner

@APIWT commented on GitHub (Jul 26, 2019):

@StefH What operating system are you running? Would it help if we were to provide a solution created in Windows first with a video of repro steps?

@APIWT commented on GitHub (Jul 26, 2019): @StefH What operating system are you running? Would it help if we were to provide a solution created in Windows first with a video of repro steps?
Author
Owner

@StefH commented on GitHub (Jul 26, 2019):

windows 10
vs2017 with android 27 and xamarin installed
android 8.1 oreo used

A video could help.

Questions:

  • When you include WireMock.Net in the test project, which framework is chosen?
  • What version from json.net can you include with no issues in your projects?
@StefH commented on GitHub (Jul 26, 2019): windows 10 vs2017 with android 27 and xamarin installed android 8.1 oreo used A video could help. Questions: - When you include WireMock.Net in the test project, which framework is chosen? - What version from json.net can you include with no issues in your projects?
Author
Owner

@APIWT commented on GitHub (Jul 26, 2019):

So it turns out that JSON.NET might have nothing to do with the issue since the test project only includes NUnit 3 and WireMock.Net

I believe that by default .NET Framework 4.7 is chosen when making UI test projects, but I'll report back when I have a project created in your environment. Fair warning: I will probably have to use Visual Studio 2019 unless there is a community version of 2017 available for download. Hope this helps. I'll be really bummed out if the problem does not appear in Windows :(

@APIWT commented on GitHub (Jul 26, 2019): So it turns out that JSON.NET might have nothing to do with the issue since the test project only includes NUnit 3 and WireMock.Net I believe that by default .NET Framework 4.7 is chosen when making UI test projects, but I'll report back when I have a project created in your environment. Fair warning: I will probably have to use Visual Studio 2019 unless there is a community version of 2017 available for download. Hope this helps. I'll be really bummed out if the problem does not appear in Windows :(
Author
Owner

@StefH commented on GitHub (Oct 14, 2019):

Closing...

@StefH commented on GitHub (Oct 14, 2019): Closing...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net#180