【问题标题】:Attempting to create V8ScriptEngine instance fails with IExpando error尝试创建 V8ScriptEngine 实例失败并出现 IExpando 错误
【发布时间】:2020-02-21 04:13:42
【问题描述】:

我正在尝试创建 V8ScriptEngine 的实例,但遇到如下异常:

using Microsoft.ClearScript.V8;
V8ScriptEngine engine = new V8ScriptEngine();

例外:"Could not load type 'System.Runtime.InteropServices.Expando.IExpando' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'."

我错过了什么?这是 ClearScript 5.4 版

【问题讨论】:

  • 您在使用 .net Core 吗?
  • @vasily.sib 是的
  • as docs 状态 - .net Core 不支持它
  • 但正如github 所说 - 它在 .net Core 3.1 中受支持,但仅在 Windows 上受支持
  • @vasily.sib righto,我的项目使用的是 .net core 3.0。我目前正在尝试更新它以使用 3.1。会让你知道情况如何。

标签: c# clearscript


【解决方案1】:

要获得 .NET Core 支持,您需要 ClearScript 6.0(或更高版本)。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-02-21
    • 1970-01-01
    • 2019-01-23
    • 2023-01-03
    • 1970-01-01
    • 1970-01-01
    • 2018-10-20
    • 1970-01-01
    相关资源
    最近更新 更多