0

I met a problem, every time I want to deploy my app again, I will encounter error:

"An exception of type 'System.IO.FileNotFoundException' occurred in DropNetRT.ni.DLL but was not handled in user code Additional information: Could not load file or assembly 'System.Net.Http.Phone, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified."

I have to uninstall the app, and then deploy. But next deployment same error again.

xhg
  • 1,850
  • 2
  • 21
  • 35
  • is it in your device or in the emulator? – Kulasangar Jul 05 '14 at 16:57
  • in device, with WP8.1 Dev Preview – xhg Jul 05 '14 at 17:00
  • Are you using any kind of Google Apis? If so take a look [here](http://stackoverflow.com/questions/18370360/could-not-load-file-or-assembly-system-net-http-primitives-located-assemblys-m) This one of the issue which arose for ASP too http://stackoverflow.com/questions/9431975/ – Kulasangar Jul 05 '14 at 17:03
  • I took a look at the question, thanks. It works for me. – xhg Jul 05 '14 at 17:29

1 Answers1

0

I'm also seeing this error - it only shows in Release mode, running the same app in Debug mode it doesn't repro.

The WP8.1 Silverlight solution builds without issue in both configurations.

Workaround for me is to remove all System.Net references solution-wide, clean the solution, then add them back in (using NuGet with Microsoft.Net.Http). Takes time and is annoying, but it works.

There seems no logic that the System.Net references removed and added back in are exactly the same assemblies and work fine on first deployment but fail on redeployment. It is even possible to redeploy exactly the same build and see this error.

RHMobi
  • 1