Environment
- Pythonnet version: 3.0.1
- Python version: 3.10
- Operating System: windows 11/10
- .NET Runtime: NET Framework 4.6.1
Details
I am trying to call Python code from .NET Framework app but on some machines PythonEngine.Initialize() crashes.
Runtime.PythonDLL = "C:\\Python\\Python310\\python310.dll";
PythonEngine.Initialize();
Exception:
System.TypeInitializationException: 'The type initializer for 'Delegates' threw an exception.'
There are two inner exceptions:
DllNotFoundException: Could not load C:\Python\Python310\python310.dll.
Win32Exception: %1 is not a valid Win32 application
The path is correct and the dll exists.

Environment
Details
I am trying to call Python code from .NET Framework app but on some machines PythonEngine.Initialize() crashes.
Exception:
System.TypeInitializationException: 'The type initializer for 'Delegates' threw an exception.'
There are two inner exceptions:
DllNotFoundException: Could not load C:\Python\Python310\python310.dll.
Win32Exception: %1 is not a valid Win32 application
The path is correct and the dll exists.