ExternalTool bug fix: wasn't able tool load serveral dll

This commit is contained in:
Hathor86 2015-12-06 00:52:07 +01:00
parent 35066b69ef
commit 12388cbe3d
2 changed files with 6 additions and 3 deletions

View File

@ -1267,7 +1267,8 @@ namespace BizHawk.Client.EmuHawk
{
try
{
externalToolFile = Assembly.ReflectionOnlyLoadFrom(fi.FullName);
//externalToolFile = Assembly.ReflectionOnlyLoadFrom(fi.FullName);
externalToolFile = Assembly.LoadFrom(fi.FullName);
}
catch (BadImageFormatException)
{
@ -1286,10 +1287,12 @@ namespace BizHawk.Client.EmuHawk
existing in another assembly, it raises the exception.
But the advantage of this is that memory footprint is reduced
EDIT: In fact, I have some trouble when loading Reflection only... moved to regular load
*/
try
{
assemblyTypes = externalToolFile.GetTypes();
assemblyTypes = externalToolFile.GetTypes().Where<Type>(t => t != null && t.FullName == "BizHawk.Client.EmuHawk.CustomMainForm").ToArray<Type>();
}
catch (ReflectionTypeLoadException ex)
{

View File

@ -91,7 +91,7 @@ namespace BizHawk.Client.EmuHawk
T existingTool = (T)_tools.FirstOrDefault(x => x is T);
if (existingTool != null)
if (existingTool != null && typeof(T) != typeof(IExternalToolForm))
{
if (existingTool.IsDisposed)
{