diff --git a/FreeMote.Psb/Plugins/FreeMount.cs b/FreeMote.Psb/Plugins/FreeMount.cs index 61dbce5..e531349 100644 --- a/FreeMote.Psb/Plugins/FreeMount.cs +++ b/FreeMote.Psb/Plugins/FreeMount.cs @@ -151,7 +151,7 @@ public void InitPlugins(string path) } catch (CompositionException compositionException) { - Debug.WriteLine(compositionException.ToString()); + Console.WriteLine(compositionException.ToString()); } UpdatePluginsCollection(); @@ -224,7 +224,17 @@ private void AddCatalog(string path, AggregateCatalog catalog) } else if (File.Exists(path)) { - catalog.Catalogs.Add(new AssemblyCatalog(Assembly.LoadFile(path))); + try + { + catalog.Catalogs.Add(new AssemblyCatalog(Assembly.LoadFile(path))); + } + catch (NotSupportedException e) + { + Console.WriteLine($"[ERROR] Load plugin failed from {path}"); + Console.WriteLine(@"1. Are you running program on OneDrive or over local network? Try running on your local drive. +2. Try unblocking this file from properties. If you don't know how to do this, google it."); + Console.WriteLine(e); + } } }