AppDomain.CurrentDomain.AssemblyResolve事件

 void Application_Start(Object sender, EventArgs e) {
        // Code that runs on application startup
        AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);

    }
    System.Reflection.Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
    {
        //根据 args.Name 加载自己的assembly
    }

你可能感兴趣的:(assembly)