Fix for #3528518, this allows (tested with .net 4.0) to load plugins from "remote" locations without getting CAS issues. I expect that with .NET 2.0 it's still not possible to do so, but that's not really a huge issue...

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1959 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-07-20 11:09:30 +00:00
parent c491f15423
commit c820d3edce
3 changed files with 91 additions and 3 deletions

View file

@ -229,7 +229,7 @@ namespace Greenshot.Helpers {
foreach (string pluginFile in pluginFiles) {
LOG.DebugFormat("Checking the following file for plugins: {0}", pluginFile);
try {
Assembly assembly = Assembly.LoadFrom(pluginFile, Assembly.GetExecutingAssembly().Evidence);
Assembly assembly = Assembly.LoadFrom(pluginFile);
PluginAttribute[] pluginAttributes = assembly.GetCustomAttributes(typeof(PluginAttribute), false) as PluginAttribute[];
if (pluginAttributes.Length > 0) {
PluginAttribute pluginAttribute = pluginAttributes[0];