Uwp app crash immediately after compiled with .net native toolchain
Asked Answered
T

2

25

I'm creating an uwp app. My app works well in debug mode. But when compiled with .net native toolchain, which is essential to publish app to the Store, it crash immediately. I was trying to enable all the exception settings but it didn't hit any breakpoints. All the information I can get from the output is:

The program '[9548] DemoBuildError.exe' has exited with code -1073741511 (0xc0000139) 'Entry Point Not Found'. Activation of the Windows Store app '9e380736-23cf-476f-b625-be7baa70ad56_jatac5brr3jea!App' failed with error 'The app didn't start'.

I also try to create new project and copy, paste carefully as mentioned in some previous threads but no luck. Here is my demo project to reproduce the error: https://bitbucket.org/wpdev01/demobuilderror

Any ideas?

Topnotch answered 6/3, 2018 at 6:35 Comment(5)
If you created a new project, it should definitely compile with .NET Native just fine. I would suggest slowly adding the code from your main project to see where exactly do the problems start.Williswillison
I knew that .NET Native had problem with the library which I want to implement. In the main project, I even don't need to call to the library, the app still has the same problem.Topnotch
I am unable to access the BitBucket link. Could you make it public? Or post it somewhere as a zip file?Williswillison
@Topnotch - Your libraries need to be portable into the UWP framework. If your're using a rogue DLL, that might be your problem.Osculate
The time I also encountered this issue (no problem in Debug, immediate crash in Release), it was because of the combination of using reflection and .NET Native compiling. See github.com/dotnet/runtime/issues/978 . With me, adding <Namespace Name="System.Text.Json.Serialization.Converters" Dynamic="Required All"/> to the Properties/Default.rd.xml file solved the crashes.Sailboat
A
1

Since your repo is private, I'm also facing the same problem, I guess it's due to some third party controls your refered.

In my project, I unloaded all third party controls, it works fine again.

Amorita answered 22/5, 2020 at 8:23 Comment(0)
C
0

in your case its quite a problem.

  1. try to add "unhandledexception" :https://learn.microsoft.com/en-us/dotnet/api/system.appdomain.unhandledexception?view=netframework-4.8
  2. debug and see what's next.

    in debug mode compiler optimizations are turned off but the app is should work the same.

Custombuilt answered 29/4, 2019 at 8:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.