是否可以在同一应用程序中并行使用 IronPython 和 IronRuby?
当我引用最新版本的 Microsoft.Scripting(IronPython 中包含的版本)时,我在 Visual Studio 中收到警告。
是否可以在同一应用程序中并行部署/使用它们? 是否有更好/更动态的方法来实例化运行时?
private ScriptRuntime GetScriptRuntime()
{
if ("IronRuby".Equals(scriptUnit.Type))
{
return IronRuby.Ruby.CreateRuntime();
}
if ("IronPython".Equals(scriptUnit.Type))
{
return IronPython.Hosting.Python.CreateRuntime();
}
throw new Exception("Unknown Script Type [" + scriptUnit.Type + "]");
}
Text of Warning - Module 'Microsoft.Scripting, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' should be referenced.
I get a warning in Visual Studio when I reference the latest version of Microsoft.Scripting (the one included with IronPython).
Is it possible to deploy / use them side by side in the same application?
Is there a better / more dynamic way to instantiate the runtimes?
private ScriptRuntime GetScriptRuntime()
{
if ("IronRuby".Equals(scriptUnit.Type))
{
return IronRuby.Ruby.CreateRuntime();
}
if ("IronPython".Equals(scriptUnit.Type))
{
return IronPython.Hosting.Python.CreateRuntime();
}
throw new Exception("Unknown Script Type [" + scriptUnit.Type + "]");
}
Text of Warning - Module 'Microsoft.Scripting, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' should be referenced.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有可能,您只需要找到使用相同核心 .dll 构建的版本或由您自己构建。
It is possible, you just have to find versions that are built with the same core .dlls or build both by yourserf.