static void Main() { string resource1 = "XInject.ObjectListView.dll"; EmbeddedAssembly.Load(resource1, "ObjectListView.dll"); AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new frmMain()); }
static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args) { return(EmbeddedAssembly.Get(args.Name)); }