14

I got this error in my WP8.1 app,

Application_UnhandledException ERROR: Native images generated against multiple versions of assembly System.Net.Http.Primitives. at CoolEditor.Class.DropNetRt.DropNetClient.LoadClient() at CoolEditor.Class.DropNetRt.DropNetClient..ctor(String apiKey, String appSecret) at CoolEditor.MainPage.d__6e.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.AsyncMethodBuilderCore.b__3(Object state)

And I have only one solution under the project.

Rikesh
  • 26,156
  • 14
  • 79
  • 87
xhg
  • 1,850
  • 2
  • 21
  • 35
  • I had a very similar problem after changing the configuration from Debug to Release before submitting a Windows Phone 8.1 Silverlight app. It was resolved by cleaning the project and rebuilding it. – Hong Mar 03 '16 at 19:00
  • I am having the same problem – Donald Jansen Apr 07 '16 at 13:37

4 Answers4

1

Are you using a third party assembly that has a reference against a different version of System.Net.Http.Primities than the reference in your own project? Are any third parties being used that are not intended for use on the Windows Phone architecture?

Phil Wright
  • 22,580
  • 14
  • 83
  • 137
1

I had the same error, in my Xamarin.Forms solution after I've had retargeted my WindowsPhone project to Windows Phone 8.1 Silverlight. The solution: I changed the portable projects targets property: changed from WindowsPhone silverlight 8 to Windows Phone silverlight 8.1

surex
  • 31
  • 4
0

Make sure all your projects are using the same version of not just Microsoft.Net.Http but also:

Microsoft.Bcl.Build

and

Microsoft.Bcl

The error message can be a bit confusion on these cases.

D.Rosado
  • 5,634
  • 3
  • 36
  • 56
0

I occasionally have this error when deployinb a new version of Silverlight WP8.1 app to a WM10 phone. Uninstalling the old version usually works thought it is not a desirable remedy.

Hong
  • 17,643
  • 21
  • 81
  • 142