1 year ago

#214078

test-img

donaldp

Packaged Xamarin Forms UWP app crashes on launch - works in VS Debug and Release modes

I've been re-writing an app and run into (again :-( ) that it's working in both Debug and Release modes, but the packaged app crashes on launch. i.e. never even gets to the app's home screen. I had this happen first time around, but eventually solved it from Googled results, however this time I've reached a dead-end and not sure what else I can do. Things I tried previously and worked but no effect this time...

  1. deleted all .vs folders, clean, build.
  2. tick "compile with .net native tool chain" (in fact that is now ticked by default I found. So I tried turning it off, and the packaging then failed with some error about the manifest not matching something now)
  3. 3 I may be able to adapt, but not sure how yet. Last time I had ZXing in the app, and that ended up being the problem. It was solved by adding
List<Assembly> assembliesToInclude=new List<Assembly>();
assembliesToInclude.Add(typeof(ZXing.Net.Mobile.Forms.WindowsUniversal.ZXingScannerViewRenderer).GetTypeInfo().Assembly);
Xamarin.Forms.Forms.Init(e,assembliesToInclude);

I don't have ZXing in the new app yet, BUT one package I've added that I had before is CsvHelper, so I suspect that may be the cause. Note that my previous version of the packaged app was working before I added it, so that adds to the suspicion.

But I can't find anyone who has run into this, so I'm not sure how I can find what assemblies would need to be added? (when it happened with ZXing, I just copied what someone else had said. They in fact had listed a whle bunch of ZXing assemblies, but I ended up being able to narrow it down to one by adding all and then taking away one at a time)

So...

  1. any ideas on how to find what CsvHelper assemblies might need to be added? i.e. how do I even find what assemblies it has in it to begin with?
  2. any other suggestions? This is the error I'm getting from the Windows Event Viewer - not sure if any of these numbers actually tell me anything useful, and if so which ones and how?
Faulting application name: Myappname.UWP.exe, version: 1.0.0.0, time stamp: 0x62158bed
Faulting module name: KERNELBASE.dll, version: 10.0.19041.1503, time stamp: 0xb2acaea9
Exception code: 0xc000027b
Fault offset: 0x000000000010b382
Faulting process ID: 0x5660
Faulting application start time: 0x01d82857d5105201
Faulting application path: C:\Program Files\WindowsApps\00bf2865-c554-4952-9142-753983df67d5_0.3.0.0_x64__b71kk8c7kdz5g\Myappname.UWP.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report ID: fb10dc41-a7f1-4d74-ad8e-befa62556dcc
Faulting package full name: 00bf2865-c554-4952-9142-753983df67d5_0.3.0.0_x64__b71kk8c7kdz5g
Faulting package-relative application ID: App

Thanks, Donald.

c#

xamarin.forms

uwp

assemblies

csvhelper

0 Answers

Your Answer

Accepted video resources