This repository has been archived by the owner on Jan 25, 2023. It is now read-only.
First binary contribution with OS autodetection.
Pre-release
Pre-release
Python.Config.dll - is an all in one binary distribution of PythonNet.
It supports Win64,Linux64, Python 2.7, Python 3.5
pcfgtest.exe is a diagnostic utility.
If you put bootstrap code:
static Program()
{
Console.WriteLine("Starting application...");
// Required to be placed in the static constructor for Mono.
PythonConfig.EnsureInitialized();
}
[STAThread]
private static int Main(string[] args)
{
// Mono workaround required to fix AssemblyResolve + EntryPoint class bug.
// Classes that was referenced from EntryPoint class cannot use assemblies resolved through "AssemblyResolve"
Action monoWorkaround = () =>
{
try
{
// You should put this initialized only if some component starting to use it before first application configuration file read attempt.
// So in rare cases.
PythonEngine.Initialize();
to your project and switch off "copy local" property on Python.Runtime.dll assembly, then different version of Python.Runtime.dll will be loaded.
You also should put version into configuration file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="pythonConfig" type="Python.Config.PythonConfigSection, Python.Config, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
</configSections>
<pythonConfig pythonVersion="3.5"/>
</configuration>