pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/pythonnet/pythonnet/pull/2701.patch

f --git a/src/runtime/AppConfig.cs b/src/runtime/AppConfig.cs deleted file mode 100644 index 2318c3360..000000000 --- a/src/runtime/AppConfig.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Linq; -using System.Reflection; - -namespace Python.Runtime -{ - static class AppConfig - { - //github.com/ - //github.com/ Override the AppDomain's config file path and reset the - //github.com/ ConfigurationManager cache so the CLR re-reads binding redirects. - //github.com/ Uses reflection to avoid a compile-time dependency on System.Configuration. - //github.com/ - public static void SetConfigFile(string path) - { - AppDomain.CurrentDomain.SetData("APP_CONFIG_FILE", path); - ResetConfigMechanism(); - } - - private static void ResetConfigMechanism() - { - var configManager = Type.GetType( - "System.Configuration.ConfigurationManager, System.Configuration, " - + "Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"); - - if (configManager == null) - return; - - configManager - .GetField("s_initState", BindingFlags.NonPublic | BindingFlags.Static) - ?.SetValue(null, 0); - - configManager - .GetField("s_configSystem", BindingFlags.NonPublic | BindingFlags.Static) - ?.SetValue(null, null); - - configManager.Assembly - .GetTypes() - .FirstOrDefault(x => x.FullName == "System.Configuration.ClientConfigPaths") - ?.GetField("s_current", BindingFlags.NonPublic | BindingFlags.Static) - ?.SetValue(null, null); - } - } -} From ef2c11aec496538e357da95d39366ae35be15f1d Mon Sep 17 00:00:00 2001 From: Metadorius Date: Fri, 3 Apr 2026 20:48:48 +0300 Subject: [PATCH 5/5] unbreak non-FW builds --- src/runtime/Loader.cs | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/runtime/Loader.cs b/src/runtime/Loader.cs index 5f76a0c05..08c0be7cb 100644 --- a/src/runtime/Loader.cs +++ b/src/runtime/Loader.cs @@ -18,16 +18,22 @@ public unsafe static int Initialize(IntPtr data, int size) // Version=0.0.0.0 vs the 4.0.2.0 shim on disk). Binding redirects // via config files can't be injected after AppDomain creation, so // resolve assemblies from our runtime directory directly. - AppDomain.CurrentDomain.AssemblyResolve += (_, args) => + // Only needed on .NET Framework; on .NET (Core) this causes + // duplicate assembly loads, as .deps.json is respected and + // the correct assembly is already found. + if (typeof(object).Assembly.GetName().Name == "mscorlib") { - var name = new System.Reflection.AssemblyName(args.Name); - var dir = Path.GetDirectoryName(typeof(Loader).Assembly.Location); - var path = Path.Combine(dir, name.Name + ".dll"); + AppDomain.CurrentDomain.AssemblyResolve += (_, args) => + { + var name = new System.Reflection.AssemblyName(args.Name); + var dir = Path.GetDirectoryName(typeof(Loader).Assembly.Location); + var path = Path.Combine(dir, name.Name + ".dll"); - return File.Exists(path) - ? System.Reflection.Assembly.LoadFrom(path) - : null; - }; + return File.Exists(path) + ? System.Reflection.Assembly.LoadFrom(path) + : null; + }; + } var dllPath = Encodings.UTF8.GetString((byte*)data.ToPointer(), size); pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy