简体   繁体   中英

.NET MAUI app only runs on emulator or device connected to USB debugger

I'm a novice at mobile development with Xamarin Forms and .NET MAUI. My App runs fine in debug mode but crashes on startup otherwise.

Can somebody tell me how to find the logging info I need to figure out what is going on? Or maybe someone else has had this same issue.

Kind of a shame that I have a bug that only strikes when there's no debugger running...

I've tried uninstalling the app and reinstalling it. Cleaning the solution. Rebuilding. Restarting the Windows Machine. No help.

I had a similar issue, what was causing it for me was having spaces in the Assembly Name.

Right click on the solution, click Properties, under General make sure Assembly Name doesn't have spaces.

I can confirm similar issues as Wandtke, creating a.Net/Maui/Blazer app with spaces or parentheses, the App will crash without the debugger connected. I followed Wandtke directions and changed the Assembly name from $(MSBuildProjectName), which would resolve to MauiApp2(Test8) in my test, to simply MauiApp2 and it ran fine without the debugger running.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM