码迷,mamicode.com
首页 > 其他好文 > 详细

设置程序集(dll)引用路径,整洁美观

时间:2016-01-14 15:56:41      阅读:297      评论:0      收藏:0      [点我收藏+]

标签:

static class Program
{
//设置引用程序集路径
static Program()
{
AppDomain.CurrentDomain.SetData("PRIVATE_BINPATH", "DevExpress;");
AppDomain.CurrentDomain.SetData("BINPATH_PROBE_ONLY", "DevExpress;");
var method = typeof(AppDomainSetup).GetMethod("UpdateContextProperty", BindingFlags.NonPublic | BindingFlags.Static);
var funsion = typeof(AppDomain).GetMethod("GetFusionContext", BindingFlags.NonPublic | BindingFlags.Instance);
method.Invoke(null, new object[] { funsion.Invoke(AppDomain.CurrentDomain, null), "PRIVATE_BINPATH", "DevExpress;" });
}


/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}

设置程序集(dll)引用路径,整洁美观

标签:

原文地址:http://www.cnblogs.com/yt954437595/p/5130066.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!