Guarding against old DLLs

  • Thread starter Thread starter Jeff Stewart
  • Start date Start date
J

Jeff Stewart

..NET applications look in the executable's directory (among other places)
for any DLLs that it depends on. If an application finds an older version
of a DLL than the one it was compiled against, does it exit gracefully or
crash? And, is that check performed at startup, or will it crash whenever a
newer call cannot be found in the older DLL?
 
Jeff,
If an application finds an older version
of a DLL than the one it was compiled against, does it exit gracefully or
crash?

If the assembly doesn't have a strong name, it will simply load the
newer version and use that. Otherwise you'll get an exception that can
be handled to exit gracefully.

And, is that check performed at startup, or will it crash whenever a
newer call cannot be found in the older DLL?

It's done when the assembly is needed for the first time, which isn't
necessarily at startup.



Mattias
 
Back
Top