DLL error in Edge.js when called from C#

1.7k Views Asked by At

First I've installed the latest Edge Nuget Package. Then I'm running the basic hello world starting example and have been running into this error on Windows 2010 w/ Visual Studio 2015.

enter image description here

When I execute the same hello world code on OS-X I get this error.

enter image description here

Here's a break out of the locals variable tree. Looks like the error might be similar.

enter image description here

The code looks like this. It is literally copied from the 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();
    }
}
2

There are 2 best solutions below

0
On BEST ANSWER

Resolved this problem by copying the folder edge into the bin folder.

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

2
On

When you install Edgejs from nuget it creates an edge folder in your solution. Node.dll should be in your x64 & x86 folders.