Can I use IronPython and IronRuby side by side in one application?

I get a warning in Visual Studio when I refer to the latest version of Microsoft.Scripting (the one that comes with IronPython).

Is it possible to use / use them next to each other in one application? Is there a better / more dynamic way to create runtime instances?

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. 
+4
source share
1 answer

Perhaps you just need to find versions that are built using the same .dll kernel, or build both using yourserf.

+3
source

Source: https://habr.com/ru/post/1344184/


All Articles