private static Assembly LoadPluginAssembly(string pluginAssemblyPath)
{
try
{
Logging.Log(string.Format("Attempting load load Assembly {0} into AppDomain {1}", pluginAssemblyPath, AppDomain.CurrentDomain.FriendlyName));
var asm = Assembly.LoadFile(pluginAssemblyPath);
Logging.Log("Loaded assembly " + asm.FullName);
return asm;
}
catch (Exception ex)
{
Logging.Log("Unexpected error while trying to load assembly " + pluginAssemblyPath + ":\n" + ex.GetTrace());
return null;
}
}