Dynamic Load of a DLL after ILMerge
In a project, we dynamically load a .dll based on an objects settings. Prior to ILMerge, this worked fine. We now used ILMerge and created one .dll, but the load fails. How do you dynamically load a .dll after it was ILMerged? We are using VS2008 and C#.
DLLS: Common.dll, CommonMedical.dll
NEW DLL: DMCommon.dll
Current Code that Fails to load the .dll:
asm = Assembly.LoadFrom("CommonMedical.dll");What am 开发者_StackOverflow社区I doing wrong? I even tried .Load, and I do not see any issues with the name space because it works without ILMerging. Thanks in advance,
Craig
The obvious answer, change your code to: asm = Assembly.LoadFrom("DMCommon.dll");
You've created a new merged assembly file and you're using the LoadFrom which loads using a filename.
精彩评论