嵌入 IronRuby 和 IronPython
我正在尝试在示例应用程序中运行ironruby 和ironpython。 我遇到了一个例外 - 未处理的异常:System.Reflection.TargetInitationException:异常有 被调用的目标抛出。 ---> System.Reflection.TargetInvocat ionException:无法加载语言“IronPython 2.6.2”:无法加载文件或 程序集'Microsoft.Dynamic,版本= 1.0.0.0,文化=中性,PublicKeyToken = 3 1bf3856ad364e35' 或其依赖项之一。系统找不到文件 spe 化。 ---> System.IO.FileNotFoundException:无法加载文件或程序集“M” icrosoft.Dynamic,版本=1.0.0.0,文化=中性,PublicKeyToken=31bf3856ad364 e35' 或其依赖项之一。
该怎么办?如何修复它?
I am trying to run both ironruby and ironpython at the sample application.
I am getting an exception -
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has
been thrown by the target of an invocation. ---> System.Reflection.TargetInvocat
ionException: Failed to load language 'IronPython 2.6.2': Could not load file or
assembly 'Microsoft.Dynamic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3
1bf3856ad364e35' or one of its dependencies. The system cannot find the file spe
cified. ---> System.IO.FileNotFoundException: Could not load file or assembly 'M
icrosoft.Dynamic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364
e35' or one of its dependencies.
What to do? How to fix it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅我对另一个类似问题的答案。 IronPython 和 IronRuby 依赖于其他库才能工作。这些库之一是 Microsoft.Dynamic,您的应用程序似乎无法找到它。确保 DLL 与您的应用程序位于同一目录中(或在 GAC 中)。
我相信这个异常与在同一项目中同时使用 IronPython 和 IronRuby 无关;这只是一个巧合。
See my answer to another similar question. IronPython and IronRuby depend on other libraries to work. One of these libraries is Microsoft.Dynamic, which your application seems unable to find. Make sure the DLL is in the same directory as your application (or in the GAC).
I believe this exception has nothing to do with using both IronPython and IronRuby in the same project; that is merely a coincidence.