Search code examples
resolver

What is a resolver (specifically in C#)


new to C# (and programming in general) and have a question about Resolvers:

What does it mean to Resolve an assembly (i.e. a .dll file)? Basically I am trying to integrate our custom-made CRM with Sage and am told that before I can connect to the Sage DB I need to locate a particular assembly and resolve it BEFORE I resolve all the other relevant assemblies. I know that is vague but it's a fairly general question so I'm hoping someone can help me out!

Please note this is in C#.


Solution

  • Resolving an assembly means locating and loading it. If the assembly is not strong signed the steps followed for resolving it are:

    • Try to load in the Appbase directory (where the application is hosted)
    • Try to load in a sub of the Appbase with the same name of the assembly (e.g. Appbase/acme/acme.dll)
    • Try to load from additional directories specified in the assembly.exe.config (xcopy deployment)

    If the assembly is strong signed the CLR checks also in the GAC and checks if there are codebase hints for the specified assembly.