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@ea.com>
Go to Windows Update and make sure that all versions of .NET are installed. ****
** **
*From:* Juanma Belda [mailto:jmbeldalois@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@ea.com>****
Do you have the same versions of .NET installed on both machines?****
****
*From:* pythondotnet-bounces+btribble=ea.com@python.org [mailto: pythondotnet-bounces+btribble=ea.com@python.org] *On Behalf Of *Juanma Belda *Sent:* Tuesday, March 27, 2012 8:52 AM *To:* pythondotnet@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,
-- Juanma****
** **
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@python.org [mailto:pythondotnet-bounces+btribble=ea.com@python.org] On Behalf Of Juanma Belda Sent: Thursday, March 29, 2012 1:31 AM To: pythondotnet@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@ea.com<mailto:btribble@ea.com>> Go to Windows Update and make sure that all versions of .NET are installed. From: Juanma Belda [mailto:jmbeldalois@gmail.com<mailto:jmbeldalois@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@ea.com<mailto:btribble@ea.com>> Do you have the same versions of .NET installed on both machines? From: pythondotnet-bounces+btribble=ea.com@python.org<mailto:ea.com@python.org> [mailto:pythondotnet-bounces+btribble<mailto:pythondotnet-bounces%2Bbtribble>=ea.com@python.org<mailto:ea.com@python.org>] On Behalf Of Juanma Belda Sent: Tuesday, March 27, 2012 8:52 AM To: pythondotnet@python.org<mailto:pythondotnet@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, -- Juanma
participants (2)
-
Juanma Belda
-
Tribble, Brett