开发者

Is it possible to use IronPython and IronRuby side by side in the same Application?

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 + "]");
}

Is it possible to use IronPython and IronRuby side by side in the same Application?

Text of Warning - Module 'Microsoft.Scripting, Version=1.0.0.0, Culture=neutral, 开发者_JAVA技巧PublicKeyToken=31bf3856ad364e35' should be referenced.


It is possible, you just have to find versions that are built with the same core .dlls or build both by yourserf.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜