v8dotnet -- can't load v8.net.proxy.interface

1

I'm trying to write a hello world program that prints some basic js to the console using v8dotnet.

I have a simple application

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using V8.Net;

namespace v8test
{
    class Program
    {
        static void Main(string[] args)
        {
            var v8engine = new V8Engine();
        }
    }
}

But it doesn't seem to work

Additional information: Could not load file or assembly 'V8.Net.Proxy.Interface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An operation is not legal in the current state. (Exception from HRESULT: 0x80131509)

I have put all the dll's that come with the binary's in my bin/debug folder and added the reference V8.NET dll (like the documentation described). I've tried multiple combinations of setting x86 or x64 and setting the version of dotnet to 4.0.

I made sure i have the visual c++ 2012 redistribution installed. Regardless of what I try, I can't seem to get it to work. Any help?

c#
v8
embedded-v8
v8.net
asked on Stack Overflow Dec 18, 2013 by user1167650 • edited Mar 7, 2019 by James Wilkins

2 Answers

2

For those having this same problem, it turns out is a security issue.

the right setup is to have V8.Net and V8.Net.SharedTypes reference and copy x86 / x64 folders into the bin/debug folder.

For each of the DLL's you have "unblock" them by right clicking and clicking properties on each of the DLL's.

answered on Stack Overflow Dec 22, 2013 by user1167650
0

There is a new version of V8.NET out that no longer uses sub-folders. Also, there is no longer a v8.dll, since it is statically linked into the V8.NET C++ projects.

CodePlex is shut down, so the new source is here: https://github.com/rjamesnw/v8dotnet

answered on Stack Overflow Mar 7, 2019 by James Wilkins

User contributions licensed under CC BY-SA 3.0