How prevent the crash and exit gracefully?
From: Boris (Boris_at_discussions.microsoft.com)
Date: 11/29/04
- Next message: Richard Blewett [DevelopMentor]: "Re: How prevent the crash and exit gracefully?"
- Next in thread: Richard Blewett [DevelopMentor]: "Re: How prevent the crash and exit gracefully?"
- Reply: Richard Blewett [DevelopMentor]: "Re: How prevent the crash and exit gracefully?"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 29 Nov 2004 15:37:03 -0800
I notice the following strange behavior of the applications running under
.NET Framework.
Let say I have application MyApp.exe which reference assembly MyAssembly.dll.
The MyAssembly.dll is strong named assembly, which is installed in the GAC.
I notice that if MyAssembly.dll is not installed in GAC or the different
version of MyAssembly.dll is installed in GAC then MyApp.exe starts OK. But
as soon as the MyApp.exe app tries to call any function from the
MyAssembly.dll the MyApp.exe application crashes.
In unmanaged VC++ 6.0 world the application wouldn't even allowed to start
if some dll are missing. The system would display error message saying that
some dll's are missing and application would gracefully exit.
I wonder whether I misunderstand something or made any mistake? Why
MyApp.exe is allowed to start in order to crash right after attemp to use any
functionality from missing dependent assembly?
I was told that CLR doesn't load anything untill it needs it. OK, but how to
prevent the crash I described above and exit gracefully like in VC++ 6.0
case?
Can anyone clarify this situation?
Thanks
Boris
- Next message: Richard Blewett [DevelopMentor]: "Re: How prevent the crash and exit gracefully?"
- Next in thread: Richard Blewett [DevelopMentor]: "Re: How prevent the crash and exit gracefully?"
- Reply: Richard Blewett [DevelopMentor]: "Re: How prevent the crash and exit gracefully?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|