c# 更改调用程序集(dll)位置
时间:2017-06-02 09:14:21
收藏:0
阅读:504
static System.Reflection.Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args) { string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"lib\"); path = Path.Combine(path, args.Name.Split(‘,‘)[0]); path = String.Format(@"{0}.dll", path); return System.Reflection.Assembly.LoadFrom(path); } AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
原文:http://www.cnblogs.com/daxiaya/p/6931693.html
评论(0)