Unable to hit debug point in C# Library from Android MAUI .NET7 App

Vaibhav Methuku 60 Reputation points
2024-03-20T07:10:46.7833333+00:00

We have a MAUI .NET 7 UWP Application, from the MAUI App C# .NET 6 library is being called. Visual Studio 2022 IDE we are using for development.

When it comes to Windows build, we are able to debug the C# library methods. However from Android, debugging point doesn't hits and same methods are failing in execution which succeeds in windows build. As we are not able to debug the methods altogether for android, hence it is becoming difficult to troubleshoot the problem.

Concerned C# .NET 6 library have embedded resources files, text files, C# class files. VB files .

We are calling the C# library via reflection from MAUI App. However, we tried to directly call the library through project reference , then also debugging didn't worked.

Few of the troubleshooting steps done, but it didn't worked -

Ensured that, within the .NET MAUI project settings under Android options, both the "Use Shared Runtime" and "Enable Developer Instrumentation" settings are activated.

Adjusted the project's PropertyGroups to specify Android as the primary target in the TargetFrameworks.

Explored the possibility of disabling all XML Hot Reload options through Visual Studio's path at Tools -> Options.

Thanks
Vaibhav Methuku.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,869 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 35,471 Reputation points Microsoft Vendor
    2024-03-28T08:16:52.88+00:00

    Hello,

    For external resources referenced in the project, you can refer to this official blog for debugging.

    Best Regards,

    Alec Liu.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments