Re: Try this
- From: "Rainer Queck" <Rainer@xxxxxxxxxxxxxxx>
- Date: Thu, 3 May 2007 14:07:30 +0200
Hi Derek,
Sorry, that I did not respond so long time, but I had to switch to a
different project, and forgot about this thread. Now, back to this project,
I memorized my problem, and checked the NG, finding your Hint. It looks like
you are absolutely right! With the way you described, the event gets fired.
Thanks for your help!
Rainer
<Derek> schrieb im Newsbeitrag news:200749135434aldbadge@xxxxxxxxxxxxxxxx
I think the problem you are having is that you are trying to use the
reference in the same spot you are trying to trap the error. It fires the
event as soon as it starts to load Main (because the missing reference is
used there). As a test, put the code calling the dll in another
function/sub/whateveryoucallthem in C#, and then call that from main. Or,
rename Main as something else and create a new Main to handle these
errors.
For example (forgive my C# syntax, I don't code much in it):
static void Main(string[] args)
{
AppDomain.CurrentDomain.AssemblyResolve += new
ResolveEventHandler(CurrentDomain_AssemblyResolve);
// Start Diagnose
oldmain();
}
static void oldMain()
{
// Start Diagnose
ReportSettings reporterSettings = new ReportSettings();
FileDiagnose.Instance.DiagDir =
Helpers.PathWithBackSlash(reporterSettings.DiagDir, true);
....
}
EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com
.
- Prev by Date: Connection strings and resource files
- Next by Date: Re: Regulat expression question
- Previous by thread: Connection strings and resource files
- Next by thread: Re: application won't start if needed assembly is missing...
- Index(es):
Relevant Pages
|