【问题标题】:Where do I put Microsoft.Scripting.Debugging so that our embedded interpreter can find it?我在哪里放置 Microsoft.Scripting.Debugging 以便我们的嵌入式解释器可以找到它?
【发布时间】:2015-03-30 19:10:01
【问题描述】:

我正在尝试调试我编写的函数,但无法在常规 IronPython 解释器中运行它,因为当我们启动嵌入应用程序的函数时,我们所做的所有事情都非常棘手。

但是当我尝试运行调试器时:

import pdb
pdb.runcall(myFunction)

我收到这条消息:

无法加载文件或程序集“Microsoft.Scripting.Debugging, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null”或其依赖项之一。找到的程序集的清单定义与程序集引用不匹配。 (HRESULT 异常:0x80131040)

我应该把 DLL 放在哪里,以便嵌入式解释器可以使用它?目前我将它与 IronPython 库放在同一个文件夹中。

application folder
    resources folder
        IronPython folder
            DLL here
            Libs folder

【问题讨论】:

    标签: .net ironpython pdb


    【解决方案1】:

    将它放在 DLLs 文件夹中的 IronPython.dll 旁边应该可以工作。如果没有,您总是可以手动使用Assembly.Load 提前将其引入,或者在 Python 中使用 clr.AddReferenceFromFileAndPath

    【讨论】:

      猜你喜欢
      • 2010-11-18
      • 2014-04-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-06-23
      • 2010-10-27
      • 2012-05-10
      • 1970-01-01
      相关资源
      最近更新 更多