Load a dependent DLL in .net C# , and get path of referenced assembly

129 Views Asked by At

I am using below mentioned code snippet. but the codebase property in null, so from where can we get the path ?

  public partial class App : Application
{
    public App()z
    { 
        AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);
    }

    private Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
    {
      // how to return the assembly ? 
      // how to get the path of referred/missing assembly ?
        return Assembly;
    }
}
0

There are 0 best solutions below