fix: Fixed plugin loading for .net framework

This commit is contained in:
Chris Cameron
2021-08-31 11:00:48 -04:00
parent 74ff651798
commit ae53812a98

View File

@@ -274,17 +274,12 @@ namespace ICD.Common.Utils
string fileNameWithOutExtension = IcdPath.GetFileNameWithoutExtension(path); string fileNameWithOutExtension = IcdPath.GetFileNameWithoutExtension(path);
#if SIMPLSHARP #if !NETSTANDARD
try try
{ {
return Assembly.Load(new AssemblyName {Name = fileNameWithOutExtension}); return Assembly.Load(new AssemblyName {Name = fileNameWithOutExtension});
} }
catch (IOException) catch (Exception)
{
return Assembly.LoadFrom(path);
}
catch (FileNotFoundException)
{ {
return Assembly.LoadFrom(path); return Assembly.LoadFrom(path);
} }