Options

Dependency Merged dll not picked by my exe

karthim20karthim20 Posts: 2
edited November 5, 2014 12:11PM in SmartAssembly
Hi,
I have two exe in my application, one with smart assembly dll embedded in the exe. Another exe with dll normally referenced. All the three (two exe and one reference dll) is placed in the same root folder location. When I try to run my smart assembly embedded exe, its getting the referenced dll from the root folder. Not picking the embedded dll, when I deleted the referenced dll from the root folder and run the SA exe, its fetching the dll that is embedded in the SA.

How should I configure my SA exe to pick the dll which is embedded within it. Instead of picking the dll from the root folder?

Comments

  • Options
    Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hello,

    There isn't a way to force the embedded assembly to be used if it is still accessible in the directory, I'm sorry to say. :/

    The typical chain of events when an embedded dependency is needed, is that .NET will look for the assembly on disk using the probing process, and when that fails, it will fire the AssemblyResolve event which SmartAssembly uses to unpack and load the embedded assembly. But the AssemblyResolve event will only be triggered if the dependency cannot be found in the application directory first.

    Please let me know if you have any other questions on this!

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


Sign In or Register to comment.