System.IO.FileNotFoundException: Unable to find assembly 'MbtCom.dll'.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

System.IO.FileNotFoundException: Unable to find assembly 'MbtCom.dll'.

fadk
Hi All,
I know this is a very basic question, but despite all my efforts I haven't been able to load a third-party dll into python. I can find the dll using clr.FindAssembly("MbtCom"). I also append the required path to the sys.path, but it refuses to show up. Is there something obvious I am missing ?
 
Thank you for your time.

_________________________________________________
Python.NET mailing list - [hidden email]
http://mail.python.org/mailman/listinfo/pythondotnet
Reply | Threaded
Open this post in threaded view
|

Re: System.IO.FileNotFoundException: Unable to find assembly 'MbtCom.dll'.

Tribble, Brett

1.       Is it a managed assembly or an unmanaged .dll?

2.       If it is a managed assembly, is it registered in the GAC?

 

See: http://www.eggheadcafe.com/PrintSearchContent.asp?LINKID=713

 

also try:

 

clr.AddReference('nameOfAssembly'). Note that you do not need to include ‘.dll’ This assumes the assembly is in the system path which can be accomplished using  sys.path.insert(0, 'mypath')

 

 

 

From: pythondotnet-bounces+btribble=[hidden email] [mailto:pythondotnet-bounces+btribble=[hidden email]] On Behalf Of kfadnis
Sent: Monday, April 13, 2009 6:10 PM
To: [hidden email]
Subject: [Python.NET] System.IO.FileNotFoundException: Unable to find assembly 'MbtCom.dll'.

 

Hi All,

I know this is a very basic question, but despite all my efforts I haven't been able to load a third-party dll into python. I can find the dll using clr.FindAssembly("MbtCom"). I also append the required path to the sys.path, but it refuses to show up. Is there something obvious I am missing ?

 

Thank you for your time.


_________________________________________________
Python.NET mailing list - [hidden email]
http://mail.python.org/mailman/listinfo/pythondotnet
Reply | Threaded
Open this post in threaded view
|

Re: System.IO.FileNotFoundException: Unable to find assembly 'MbtCom.dll'.

Craig Farrow
In reply to this post by fadk
Try this:

import sys
sys.path.append("<path to your custom assembly>")

import clr
import System

clr.AddReference("MbtCom")


Craig.

14/04/2009 9:09 a.m. dï, kfadnis pišdimiš:

> Hi All,
> I know this is a very basic question, but despite all my efforts I
> haven't been able to load a third-party dll into python. I can find
> the dll using clr.FindAssembly("MbtCom"). I also append the required
> path to the sys.path, but it refuses to show up. Is there something
> obvious I am missing ?
>  
> Thank you for your time.
> ------------------------------------------------------------------------
>
> _________________________________________________
> Python.NET mailing list - [hidden email]
> http://mail.python.org/mailman/listinfo/pythondotnet

_________________________________________________
Python.NET mailing list - [hidden email]
http://mail.python.org/mailman/listinfo/pythondotnet
Reply | Threaded
Open this post in threaded view
|

Re: System.IO.FileNotFoundException: Unable to find assembly 'MbtCom.dll'.

fadk
In reply to this post by Tribble, Brett
I am not sure if its managed or unmanaged, its a third party dll that came with its software, the interface is COM (ActiveX). I have added and worked with it through C#, I load them using Add Reference in C# .NET and then find them on the COM tab. Also, when added as reference in the .NET environment they load as Interop.MBTCOMLib i.e with a different name and their copy is local and is in the project directory rather than the directory where they are located. 
 
I tried the GAC utility and its said Failure adding assembly to cache: The module was expected to contain an assembly manifest. The funny thing is clr.FindAssembly() finds it, but clr.AddReference says unable to find assembly.


 
On Mon, Apr 13, 2009 at 11:20 PM, Tribble, Brett <[hidden email]> wrote:

1.       Is it a managed assembly or an unmanaged .dll?

2.       If it is a managed assembly, is it registered in the GAC?

 

See: http://www.eggheadcafe.com/PrintSearchContent.asp?LINKID=713

 

also try:

 

clr.AddReference('nameOfAssembly'). Note that you do not need to include ‘.dll’ This assumes the assembly is in the system path which can be accomplished using  sys.path.insert(0, 'mypath')

 

 

 

From: pythondotnet-bounces+btribble=maxis.com@python.org [mailto:[hidden email]=maxis.com@python.org] On Behalf Of kfadnis
Sent: Monday, April 13, 2009 6:10 PM
To: [hidden email]
Subject: [Python.NET] System.IO.FileNotFoundException: Unable to find assembly 'MbtCom.dll'.

 

Hi All,

I know this is a very basic question, but despite all my efforts I haven't been able to load a third-party dll into python. I can find the dll using clr.FindAssembly("MbtCom"). I also append the required path to the sys.path, but it refuses to show up. Is there something obvious I am missing ?

 

Thank you for your time.



_________________________________________________
Python.NET mailing list - [hidden email]
http://mail.python.org/mailman/listinfo/pythondotnet
Reply | Threaded
Open this post in threaded view
|

Re: System.IO.FileNotFoundException: Unable to find assembly 'MbtCom.dll'.

fadk
I ended up writing a class to source the COM libraries.
Let me know if anyone has any other suggestions.
 
Thanks for your time.

On Tue, Apr 14, 2009 at 8:59 AM, kfadnis <[hidden email]> wrote:
I am not sure if its managed or unmanaged, its a third party dll that came with its software, the interface is COM (ActiveX). I have added and worked with it through C#, I load them using Add Reference in C# .NET and then find them on the COM tab. Also, when added as reference in the .NET environment they load as Interop.MBTCOMLib i.e with a different name and their copy is local and is in the project directory rather than the directory where they are located. 
 
I tried the GAC utility and its said Failure adding assembly to cache: The module was expected to contain an assembly manifest. The funny thing is clr.FindAssembly() finds it, but clr.AddReference says unable to find assembly.


 
On Mon, Apr 13, 2009 at 11:20 PM, Tribble, Brett <[hidden email]> wrote:

1.       Is it a managed assembly or an unmanaged .dll?

2.       If it is a managed assembly, is it registered in the GAC?

 

See: http://www.eggheadcafe.com/PrintSearchContent.asp?LINKID=713

 

also try:

 

clr.AddReference('nameOfAssembly'). Note that you do not need to include ‘.dll’ This assumes the assembly is in the system path which can be accomplished using  sys.path.insert(0, 'mypath')

 

 

 

From: pythondotnet-bounces+btribble=maxis.com@python.org [mailto:[hidden email]=maxis.com@python.org] On Behalf Of kfadnis
Sent: Monday, April 13, 2009 6:10 PM
To: [hidden email]
Subject: [Python.NET] System.IO.FileNotFoundException: Unable to find assembly 'MbtCom.dll'.

 

Hi All,

I know this is a very basic question, but despite all my efforts I haven't been able to load a third-party dll into python. I can find the dll using clr.FindAssembly("MbtCom"). I also append the required path to the sys.path, but it refuses to show up. Is there something obvious I am missing ?

 

Thank you for your time.




_________________________________________________
Python.NET mailing list - [hidden email]
http://mail.python.org/mailman/listinfo/pythondotnet