gpt4 book ai didi

c# - 是否可以在同一应用程序中同时使用 IronPython 和 IronRuby?

转载 作者:行者123 更新时间:2023-11-30 12:16:29 25 4
gpt4 key购买 nike

当我引用最新版本的 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 + "]");
}

Image of Warning in Visual Studio

Text of Warning - Module 'Microsoft.Scripting, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' should be referenced.

最佳答案

有可能,您只需要找到使用相同核心 .dll 构建的版本或由您自己构建。

关于c# - 是否可以在同一应用程序中同时使用 IronPython 和 IronRuby?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5344649/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com