/// <summary> /// Embed DLL's attached to the executable /// </summary> #region Embed DLL's public App() { DLLEmbed.Load("TFE_core.Library.SQLite.Community.CsharpSqlite.dll", "Community.CsharpSqlite.dll"); DLLEmbed.Load("TFE_core.Library.SQLite.Community.CsharpSqlite.SQLiteClient.dll", "Community.CsharpSqlite.SQLiteClient.dll"); DLLEmbed.Load("TFE_core.Library.Log4Net.log4net.dll", "log4net.dll"); AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve); }
/// <summary> /// Embed DLL's attached to the executable /// </summary> #region Embed DLL's public App() { try { DLLEmbed.Load("TFE_core.Library.SQLite.Community.CsharpSqlite.dll", "Community.CsharpSqlite.dll"); DLLEmbed.Load("TFE_core.Library.SQLite.Community.CsharpSqlite.SQLiteClient.dll", "Community.CsharpSqlite.SQLiteClient.dll"); DLLEmbed.Load("TFE_core.Library.Log4Net.log4net.dll", "log4net.dll"); AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve); Filesystem.WriteLog("INFO : DLLs embedded in the application"); } catch (Exception ex) { Filesystem.WriteLog("ERROR : DLLs embedding error : " + ex); } }
static System.Reflection.Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args) { return(DLLEmbed.Get(args.Name)); }