[Python.NET] Struggling with a library

Tribble, Brett btribble at ea.com
Thu Mar 29 18:40:56 CEST 2012

Hmmm, here are a couple more ideas:

Are both machines 32 or 64 bit? Are both copies of Python also 32 or 64 bit? You could be attempting to load a 32 bit dll on a 64 bit machine, or visa versa. In theory, if the assembly is C#, or VB.NET, you can compile the assembly for "Any CPU", and it should work on both. Alternatively, you could use 32bit Python on both machines, and explicitly compile the assembly for x86 (32bit).

I have also found that loading assemblies is also much more reliable if the internal namespace of the assembly matches the name of the resulting .dll.

From: pythondotnet-bounces+btribble=ea.com at python.org [mailto:pythondotnet-bounces+btribble=ea.com at python.org] On Behalf Of Juanma Belda
Sent: Thursday, March 29, 2012 1:31 AM
To: pythondotnet at python.org
Subject: Re: [Python.NET] Struggling with a library

Checked. I have Microsfot .NET framework 2.0 Service Pack 2 and Microsoft .NET framewor 3.0 Service Pack 2 on both computers.

Kind regards

2012/3/27 Tribble, Brett <btribble at ea.com<mailto:btribble at ea.com>>
Go to Windows Update and make sure that all versions of .NET are installed.

From: Juanma Belda [mailto:jmbeldalois at gmail.com<mailto:jmbeldalois at gmail.com>]
Sent: Tuesday, March 27, 2012 12:50 PM
To: Tribble, Brett
Subject: Re: [Python.NET] Struggling with a library

Sorry for my ignorance. If I type:

print System.Version()

I get: 0.0

This in the machine where everything rules (I don't have access to the others from home)

2012/3/27 Tribble, Brett <btribble at ea.com<mailto:btribble at ea.com>>
Do you have the same versions of .NET installed on both machines?

From: pythondotnet-bounces+btribble=ea.com at python.org<mailto:ea.com at python.org> [mailto:pythondotnet-bounces+btribble<mailto:pythondotnet-bounces%2Bbtribble>=ea.com at python.org<mailto:ea.com at python.org>] On Behalf Of Juanma Belda
Sent: Tuesday, March 27, 2012 8:52 AM
To: pythondotnet at python.org<mailto:pythondotnet at python.org>
Subject: [Python.NET] Struggling with a library

Dear all,

I'm a newbie in pythonnet and I have the following problem.
I am trying to load an assembly from a .dll file.
Currently I am running the trials over Windows XP and python 2.6.5 and pythonnet version 2.0 alpha 2

On my computer there is no problem on loading the library. However in another computer (notebook) with the same installation (the library in the path etc) the system fails to do the AddReference. However if I ask for findAssemblies the system is able to find it. I can add the Reference to the test dll that come with the pythonnet.

I was assuming a mismatch on the .net versions, but then: why can l loaded from some computers and not from some others?

Kind regards,


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythondotnet/attachments/20120329/54fcd988/attachment.html>

More information about the PythonDotNet mailing list