So how does assembly load work

by alski 27. March 2008 18:52
Cameron and myself were wondering what actually happens in various scenarios and so we came up with some Unit Tests. What we found
  • With local dlls it tries several paths
    • bin/Debug/TestAssembly.DLL.
    • bin/Debug/TestAssembly/TestAssembly.DLL.
    • bin/Debug/TestAssembly.EXE.
    • bin/Debug/TestAssembly/TestAssembly.EXE.
  • You need a full strong name to load from the GAC all four parts
  • You can get a strong name by attempting to load a dll locally i.e.
if you have a local dll with a strongname you can attempt to load it without a full strongname, and the local dll will be read to get the strongname and then the dll can be read FROM THE GAC Yes, this last item seems a little insane, but please try the unit test if you don’t believe me. Please let me know if you can think of more test scenarios to add.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Code | DotNet2.0

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

RecentComments

Comment RSS