Пример #1
0
        public void AssemblyDepResolver_Load_V9_different_publickey_using_depsjson_V12()
        {
            string pathDepsJsonV12       = System.IO.Path.Combine(Util.GetPluginRootDirectory(), "PluginNewtonsoftV12", "PluginNewtonsoftV12.deps.json");
            var    resolver              = new System.Runtime.Loader.AssemblyDependencyResolver(pathDepsJsonV12);
            var    assemNameNewtonsoftV9 = new System.Reflection.AssemblyName("Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=ddadddddb2a6aeed");
            var    path = resolver.ResolveAssemblyToPath(assemNameNewtonsoftV9);

            Trace.WriteLine($"Path to Newtonsoft={path}");
            Assert.IsNull(path);
        }
Пример #2
0
 public PluginLoadContext(string pluginPath)
 {
     _resolver = new System.Runtime.Loader.AssemblyDependencyResolver(pluginPath);
 }