Forum Cross Platform with Xamarin
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Config attemping to parse: 'System.Net.Http.dll.config'

Hello!

I have made up a Xamarin.Forms project for my company which includes a PCL, Xamarin.Android, Xamarin.iOS, and UWP project.
After facing the 65k method limit in Xamarin.Android I enabled Multidex and handled the startup classes in ex.multidex.keep file.
The whole solution is building fine, but when I start the app on my phone (emulator works fine) in debug mode I am facing the following problem:

The build log below shows some kind of reloding / remapping of the System.Net.dll.
When I hit the login button on the app this appears about 20 - 50 times. The app freezes and after about 5 minutes it is working fine again.
I have serval actions which use the System.Net.Http.dll and everytime I have the same problem. The time it takes went from about < 1 s up to > 5s.

05-23 09:59:42.879 D/Mono (27301): Image addref System.Net.Http[0x918b6a40] -> System.Net.Http.dll[0x97053600]: 23
05-23 09:59:42.879 D/Mono (27301): Config attempting to parse: 'System.Net.Http.dll.config'.
05-23 09:59:42.879 D/Mono (27301): Config attempting to parse: '/usr/local/etc/mono/assemblies/System.Net.Http/System.Net.Http.config'.

I implemented Multidex according to the following 2 articles / blog entries:

https://przemekraciborski.eu/2016/09/30/multidex-in-xamarin/
http://www.jon-douglas.com/2016/09/05/xamarin-android-multidex/

I guess this is a Xamaring specific problem because when I first login to my application this happens.
If I logout and try to Login again the time it takes is as it should be (about 2-5 seconds).

I found some other entries in the forum about this but I am not sure whether it is fixed or not or if I did a mistake while implementing Multidex for Xamarin.Android.

Does anybody know about this issue and how to solve it?

Kind regards,
Daniel

Sign In or Register to comment.