IronPython integration with .net API

1

I am working on an API integration with a web app. The API is written in Microsoft .Net Framework. I was able to get the API working through an C# application, but I would like to migrate this to python so I can use this within my web application.

I have been able to get all the system dll's loaded to my ironpython script. But when I try and and add the dll's for the application I'm targeting (the developer provides these for integration) i get stuck at this error:

SystemError: The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018)

I have tried adding the dll numerous different ways and I keep getting back to this error. Is the DLL not made correctly?

Full error:

IOError: System.IO.IOException: Could not add reference to assembly LSAdata.dll
   at IronPython.Runtime.ClrModule.AddReference(CodeContext context, String name)
   at IronPython.Runtime.ClrModule.AddReference(CodeContext context, Object[] references)
   at Microsoft.Scripting.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
   at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
   at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3)
   at IronPython.Compiler.Ast.CallExpression.Invoke1Instruction.Run(InterpretedFrame frame)
   at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
   at Microsoft.Scripting.Interpreter.LightLambda.Run1[T0,TRet](T0 arg0)
   at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope)
   at IronPython.Hosting.PythonCommandLine.RunFileWorker(String fileName)
   at IronPython.Hosting.PythonCommandLine.RunFile(String fileName)
python
ironpython
asked on Stack Overflow Dec 16, 2019 by Colin MacMillan

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0