android: Can't debug with VS 2022 17.1.0 Prev 1.0
I can’t debug at all. Hangs on the splash screen. A breakpoint in OnCreate of the MainActivity is never hit as I get the following in the debugger.
System.InvalidProgramException
Message=Invalid IL code in Mono.SystemDependencyProvider:Initialize (): IL_002e: endfinally
A release build runs fine, except for what was reported in #6479.
Tried on another machine, and get the same result. Both machines Windows 11
Reverted back to VS 2022 17.0.0 and can debug normally again.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 2
- Comments: 42 (24 by maintainers)
Commits related to this issue
- chore(Android): Remove workarounds not needed anymore and enabling again Fast Deployment by default for Debug as this cause issues to deploy with latest VS 2022 Prev 17.1.0 Prev 1.0 and 1.1 (issue re... — committed to unoplatform/Uno.Themes by deleted user 5 years ago
- [Xamarin.Android.Build.Tasks] default $(AndroidUseAssemblyStore) to false for debug builds Context: https://github.com/xamarin/QualityAssurance/tree/master/Manual/CrossPlatformDebugging Fixes: https:... — committed to jonathanpeppers/xamarin-android by jonathanpeppers 5 years ago
- [Xamarin.Android.Build.Tasks] default $(AndroidUseAssemblyStore) to false for debug builds Context: https://github.com/xamarin/QualityAssurance/tree/master/Manual/CrossPlatformDebugging Fixes: https:... — committed to jonathanpeppers/xamarin-android by jonathanpeppers 5 years ago
- [Xamarin.Android.Build.Tasks] default $(AndroidUseAssemblyStore) to false for debug builds (#6660) Context: https://github.com/xamarin/QualityAssurance/tree/master/Manual/CrossPlatformDebugging Fixe... — committed to dotnet/android by jonathanpeppers 5 years ago
- [Xamarin.Android.Build.Tasks] default $(AndroidUseAssemblyStore) to false for debug builds (#6660) Context: https://github.com/xamarin/QualityAssurance/tree/master/Manual/CrossPlatformDebugging Fixe... — committed to dotnet/android by jonathanpeppers 5 years ago
@agneszitte-nventive if turning on Fast Deployment solves your issue (
EmbedAssembliesIntoApk=trueis Fast Dev off, it toggles opposite of the property).Then I think the issue might be related to: https://github.com/dotnet/runtime/issues/62201
As another workaround, if you want Fast Deployment off (like if you need to Debug on an older device), you could try checking every ABI:
Same thing is happening to me: A couple of months ago I created a AppShell (Flyout) app and it was working fine on VS2019 up to date (as for 19 Nov. 2021). I transitioned to VS2022 preview (macos) and I get the same problem.
Ive downloaded .Net 6 for the m1 architecture.
edit: Just to add to the discussion, a colleague using VS2022 17.0.0 (on a Windows 11 machine) is not having this issue. Exactly the same code as me