Fix dependency references issue of c# plugins.

This commit is contained in:
qianlifeng
2014-02-23 13:32:28 +08:00
parent 67fd2b4ac0
commit 2ade16a87a
12 changed files with 210 additions and 44 deletions

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading;
@@ -20,7 +21,7 @@ namespace Wox.PluginLoader
{
try
{
Assembly asm = Assembly.LoadFile(metadata.ExecuteFilePath);
Assembly asm = Assembly.Load(AssemblyName.GetAssemblyName(metadata.ExecuteFilePath));
List<Type> types = asm.GetTypes().Where(o => o.IsClass && !o.IsAbstract && (o.BaseType == typeof(BaseSystemPlugin) || o.GetInterfaces().Contains(typeof(IPlugin)))).ToList();
if (types.Count == 0)
{