You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 30, 2023. It is now read-only.
We need a reliable way to get the top most entry assembly. In case it was unmanaged, then the first managed after that should work fine.
One of the approaches is to stack walk until locating the call from unmanaged code and take the assembly immediately before that. That was implemented on SharpRaven which could serve as a good starting point. It's based on an SO answer but added support to Mono too.
The goal here is to have a simple API that will make an extra effort to find the main application assembly.
The standard API to get it is:
Assembly.GetEntryAssembly()The problem is it can return null.
We need a reliable way to get the top most entry assembly. In case it was unmanaged, then the first managed after that should work fine.
One of the approaches is to stack walk until locating the call from unmanaged code and take the assembly immediately before that. That was implemented on SharpRaven which could serve as a good starting point. It's based on an SO answer but added support to Mono too.
The goal here is to have a simple API that will make an extra effort to find the main application assembly.
Proposed API: