[Python.NET] Error when trying to import a C# DLL

Maksim Kozyarchuk mkozyarchuk at funddevelopmentservices.com
Mon Sep 25 15:34:02 CEST 2006


            Does the issue only occur when you load the assembly from
the CAG?


            I've typically used 

Assembly.LoadWithPartialName( 'NameOfMyAssembleyWithoutDotDLL' )

from CLR import MyClass


with the DLL located in the PYTHONPATH.






From: pythondotnet-bounces at python.org
[mailto:pythondotnet-bounces at python.org] On Behalf Of Darryl Pogue
Sent: Saturday, September 23, 2006 9:51 PM
To: pythondotnet at python.org
Subject: [Python.NET] Error when trying to import a C# DLL


I'm getting this error when ever I try to use 

I need to be able to access the dll's classes in order to translate data
from one format to another.

I get this output on the console:
CLR.System.BadImageFormatException: Exception from HRESULT: 0x8013141D.
   at System.Reflection.Assembly.nLoadImage(Byte[] rawAssembly, Byte[]
rawSymbolStore, Evidence evidence, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.Load(Byte[] rawAssembly)


I have tried using 
import CLR.Huru.Plasma

but it tells me that there is no module named Huru.

The dll is in the GAC. I am able to access all System dlls and DirectX
dlls, but not my own C# dll.





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythondotnet/attachments/20060925/a0ed218d/attachment.html 

More information about the PythonDotNet mailing list