[IronPython] Problem in Loading Assembly

Martin Maly Martin.Maly at microsoft.com
Thu Dec 29 18:47:28 CET 2005

The failure is related to the STAThread attribute on IronPythonConsole's Main. We removed it recently to fix some problems, but we broke other scenarios.

the fix will be in the upcoming release. For now, you can set STAThread attribute on the IronPythonConsole's Main and the COM exception should go away.


-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of ? ??
Sent: Thursday, December 29, 2005 8:36 AM
To: users at lists.ironpython.com
Subject: [IronPython] Problem in Loading Assembly

Dear All,
    According to Tutorial provided by IronPython itself, I tried the third: 
IronPython and COM interoperability. But I failed to receive the expecting 
   At first, I encountered this error:
        Traceback (most recent call last): 
        at <shell> 
        System.InvalidCastException: Creating an instance of the COM 
component with CLSID
        {D45FD2FC-5C6E-11D1-9EC1-00C04FD7081F} from the IClassFactory 
failed due to the  
        following error: 80004002.

And I considered this as version problem. So I tried this tutorial using 
IronPython 0.9.4. I also encountered other problems. At last, I went back 
to IronPython 0.9.6 and tried again. How surpring, I didn't encounter the 
previous problem any more. But I encountered this error:
        Traceback (most recent call last):
        at <shell>
        RuntimeError: Could not load assembly AgentServerObjects.dll

And more annoyed, I also failed to load all of other external .dll files.By 
the way, I use .NET 2.0.50727.42.


More information about the Ironpython-users mailing list