Reputation: 5047
I tried to find an example of this, but I found nothing. Seems that CreateInstanceAndUnwrap and similar don't have overload for Assembly or byte array. Can someone tell me how to do this?
EDIT:
Here's link to my other question. My idea was to make a wrapper executable that runs my main executable and logs its errors. But I don't know how to catch AppDomain.FirstChanceException if I don't run it as another AppDomain.
Upvotes: 0
Views: 1035
Reputation: 1039578
You can't run an executable in another AppDomain. An executable means process and process means a different AppDomain. Think of running an executable as Process.Start
. So what you could do is to load the .NET assembly that this executable represents and invoke some method on it on another AppDomain. You could reference this executable in your calling project or load the assembly dynamically at runtime.
Upvotes: 2