Add an ability to hook into the AssemblyResolve event

Maarten Kools 6 years ago in ADAM Core updated 4 years ago 0

We would like to use partial names for all our code references and default value references. This works fine from PublishingNOW!, however, once we look at data through AssetStudio or execute maintenance jobs with the Adam.Core.CommandLine, partial names will not be resolved, causing exceptions.

ADAM currently hooks into the AssemblyResolve event to attempt to retrieve an assembly from the database, however, we'd also like the possibility to hook into this to resolve our own partial names.

A suggestion would be to have the ability to register an ICodeReference in an ADAM setting that will be executed when assemblies are being resolved.

E.g. something like this:


  <add type="PublishingNow.Core.AssemblyResolver, PublishingNow.Core, Version=..., etc." />



public class AssemblyResolver : ICodeReference


  public object Resolve(...)


    // Attempt to resolve the assembly and return it.




Hi Maarten,

You can accomplish this by providing your own hook into the AppDomain.AssemblyResolve event provided by the built-in .NET framework. I currently don't think it would be beneficial to provide a further abstraction of this event within the ADAM API.


Kind regards,



I would still need a hook into the ADAM process. For our own web application this is not a problem, however, when rules are executed through ConfigStudio or maintenance jobs are executed through the ADAM command line, there is no possibility, as far as I know, to be able to register an event handler.