4

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

Image of Warning in Visual Studio

Text of Warning - Module 'Microsoft.Scripting, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' should be referenced.
ScArcher2
  • 85,501
  • 44
  • 121
  • 160
  • have you tried splitting them into different projects (one for ironruby the other for ironpython) then referencing both from your main project? Or, if you're only going to use one (depending on the input) then just dynamically load the assembly at runtime. – Dustin Davis Mar 17 '11 at 20:34
  • Seems like the same as http://stackoverflow.com/questions/5238989/embedding-both-ironruby-and-ironpython – Shay Friedman Mar 17 '11 at 22:00

1 Answers1

3

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

Lukas Cenovsky
  • 5,476
  • 2
  • 31
  • 39