【问题标题】:DLL error in Edge.js when called from C#从 C# 调用时 Edge.js 中的 DLL 错误
【发布时间】:2016-02-12 00:50:49
【问题描述】:

首先我安装了最新的Edge Nuget Package。然后我正在运行基本的 hello world 启动示例,并且在 Windows 2010 w/Visual Studio 2015 上遇到了这个错误。

当我在 OS-X 上执行相同的 hello world 代码时,我得到了这个错误。

这里是局部变量树的一个突破。看起来错误可能类似。

代码如下所示。它实际上是从README.md of the repo 复制而来的。

using System;
using System.Threading.Tasks;
using EdgeJs;

class Program
{
    public static async void Start()
    {
        var func = Edge.Func(@"
            return function (data, callback) {
                callback(null, 'Node.js welcomes ' + data);
            }
        ");

        Console.WriteLine(await func(".NET"));
        Console.ReadKey();
    }

    static void Main(string[] args)
    {
        Task.Run((Action)Start).Wait();
    }
}

【问题讨论】:

    标签: c# node.js edgejs


    【解决方案1】:

    通过将文件夹 edge 复制到 bin 文件夹中解决了这个问题。

    参考:https://github.com/tjanczuk/edge/issues/565#issuecomment-315343743

    【讨论】:

      【解决方案2】:

      当您从 nuget 安装 Edgejs 时,它会在您的解决方案中创建一个边缘文件夹。 Node.dll 应该在您的 x64 和 x86 文件夹中。

      【讨论】:

      • 你是说它可能不存在吗?不确定要采取什么行动。 :-(
      • 尝试重新安装软件包或从他们的 github 页面自行构建。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-02-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多