J
jeeji
Hi
I have a console application that in some cases could get a
System.IO.FileLoadException
Could not load file or assembly XXX, Version=5.0.0.0, Culture=neutral,
PublicKeyToken=YYYY' or one of its dependencies. The located
assembly's manifest definition does not match the assembly reference.
(Exception from HRESULT: 0x80131040)
However, I cannot catch this exception, since it is thrown before I
reach Main() in my application. Is there a way to catch it, and by
that give a nicer message to the console, and also exit with a
relevant exit code.
Note that I know why it is throwing this exception. So all I need is a
way to handle it, and by handle I mean give a more meaningful message
to the console, and exit with code 1.
Thanks
Jeeji
I have a console application that in some cases could get a
System.IO.FileLoadException
Could not load file or assembly XXX, Version=5.0.0.0, Culture=neutral,
PublicKeyToken=YYYY' or one of its dependencies. The located
assembly's manifest definition does not match the assembly reference.
(Exception from HRESULT: 0x80131040)
However, I cannot catch this exception, since it is thrown before I
reach Main() in my application. Is there a way to catch it, and by
that give a nicer message to the console, and also exit with a
relevant exit code.
Note that I know why it is throwing this exception. So all I need is a
way to handle it, and by handle I mean give a more meaningful message
to the console, and exit with code 1.
Thanks
Jeeji