Howto load assemby at runtime before AssemblyResolve event?

Just in case you didn’t know, there is a tool called ILMerge from MS Research that merges assemblies into one file.

Also you can create Multi-file assemblies using the Assembly Linker tool.

Plus to answer you original question, the problem I think is that the runtime does not know that the assembly you loaded manually is the one it should be looking for. So in the assembly resolve event instead of loading the assembly again, just pass back the reference to the assembly that you’ve manually loaded.

Leave a Comment