Click here to Skip to main content
15,790,645 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hello everybody,
I have a little app (in c# with xamary), in debug mode RUNS PERFECT, as soon as i create a REALEASE MODE the APP FAILED and when you select one options from the device: the app stop and exit, but only in RELEASE MODE.
This is the code:
using (HttpWebResponse wResp = (HttpWebResponse)wReq.GetResponse())
                using (Stream s = wResp.GetResponseStream())
                    using (TextReader tr = new StreamReader(s))
                        json = tr.ReadToEnd();                        
                        TrackingList.ItemsSource = trackingR;
                        dynamic result = JsonConvert.DeserializeObject(json);
                        foreach (dynamic paq in result)
                            string valor = sTracking;
                            string busqueda = paq.tracking_number;
                            if (busqueda.Substring(0,4) == valor)
                                existe = "SI";
                                string contenido = "Contenido  " + ": " + paq.contenido ;
                                string peso = "Peso (Lbs) " + ": " + paq.peso ;
                                string estatus = "Estatus     " + ": " + paq.desc_estatus_proceso ;
                                trackingR.Add(new TrackingResult { OutputResult = contenido});
                                trackingR.Add(new TrackingResult { OutputResult = peso });
                                trackingR.Add(new TrackingResult { OutputResult = estatus });              
                                //var jsonContenido = "{[{" + contenido + peso + estatus + "}]}";
                                //finalJson = JsonConvert.SerializeObject(jsonContenido);

Any help?

What I have tried:

I had checked Manuals, microsoft doc,internet helps
Updated 21-Nov-22 9:20am

wrap it in a try-catch, capture the exception and display it. Now you know what your issue is.
Share this answer
Thanks to everyone,
Thanks to the try ...catch.
I found the error thanks to try.. catch: the problem
the properties were paq.contenido and it is paq.Contenido, the first letter were in lowercase.
But I still have the question: Why works on debug mode?
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900