Re: [Python.NET] Python.NET and VS2010/.NET 4.0

2011-02-08 Thread Tribble, Brett
, February 08, 2011 7:50 AM To: Bart Jonkers Cc: pythondotnet@python.org Subject: Re: [Python.NET] Python.NET and VS2010/.NET 4.0 Hi Bart, thanks for sharing the results! Indeed, you have to make sure the complete stack is compiled for the same platform. I hope this will help other people as well! 2011

Re: [Python.NET] Python.NET and VS2010/.NET 4.0

2011-02-08 Thread Oleksii Bidiuk
Hi Bart, thanks for sharing the results! Indeed, you have to make sure the complete stack is compiled for the same platform. I hope this will help other people as well! 2011/2/8 Bart Jonkers > Hi Oleskii, > > I was able to solve the issue. > > I had to change the Platform target to x86 instead

Re: [Python.NET] Python.NET and VS2010/.NET 4.0

2011-02-08 Thread Bart Jonkers
Hi Oleskii, I was able to solve the issue. I had to change the Platform target to x86 instead of Any CPU for every project in the solution. It seems that Any CPU will result in an executable that will run as 64-bit application on a 64-bit system and as 32-bit on a 32-bit system. As I have a 64-b

Re: [Python.NET] Python.NET and VS2010/.NET 4.0

2011-02-08 Thread Oleksii Bidiuk
Hi Bart, I am no way an expert on this question, but it seem that your PythonNET is trying to load a different version of runtime than the one he was compiled against. You need to make sure the same runtime is built and used for python.exe. To make sure the 4.0 is used, you can create / edit the p

Re: [Python.NET] Python.NET and VS2010/.NET 4.0

2011-02-08 Thread Bart Jonkers
Hi Oleskii, Thanks for the quick response. I searched on my system for the python26.dll and I found it in C:\Windows\SysWOW64. I copied it to c:\windows\system32\ and now I'm getting the following error: Unhandled Exception: System.BadImageFormatException: An attempt was made to load a program

Re: [Python.NET] Python.NET and VS2010/.NET 4.0

2011-02-08 Thread Oleksii Bidiuk
Hi Bart, the python26.dll is installed to the c:\windows\system32\ folder regardless of where your main Python installation goes to. I've seen similar problem when I have copied the Python26 folder to a new machine and forgot to take the python26.dll along. Check if you have the python26.dll in pl

[Python.NET] Python.NET and VS2010/.NET 4.0

2011-02-08 Thread Bart Jonkers
Hi, I followed the instructions from oleskii to build Python.NET for .NET4.0. Compilation wend fine but when I try to run python.exe I get the following error: Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'python26': The specified module could not be found. (Exception fro