Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing ClearScriptV8-64.dll, v8-ia32.dll, v8-x64.dll in C# ConsoleApp

Tags:

c#

clearscript

I want to run a simple clearscript program. For this i created a new ConsoleProject and added the reference via nuget.

When creating the Engine (first line of code)

  using (var engine = new V8ScriptEngine()) 

i get

System.TypeLoadException was unhandled _HResult=-2146233054
_message=Cannot load V8 interface assembly; verify that the following files are installed with your application: ClearScriptV8-32.dll, ClearScriptV8-64.dll, v8-ia32.dll, v8-x64.dll

I Only found the dlls: v8-ia32.dll, v8-x64.dll but not any ClearscriptV8-*.dll

I copied them to the compile output but that didn't change any when running the console.exe

I also downloaded the Package from Github and there is neither such a dll included. I only have a ClearScript.dll.

Running the included Console Project throws same error.

Where do I get those dlls from ? What am I missing ?

My output folder of the project looks like this; enter image description here

I also ran the update V8 command. It succeded but nothing changed enter image description here

Then I also installed the C++ Redistribueable like descriped here: Clearscript files cannot be found on host

like image 730
Boas Enkler Avatar asked Jan 16 '15 09:01

Boas Enkler


3 Answers

It's looking for the V8 32Bit version so make sure install this nuget package JavaScriptEngineSwitcher.V8.Native.win-x86. I was pulling my hair trying to figure out but this one definitely solved the issue for me.

like image 139
PinoyDev Avatar answered Oct 23 '22 14:10

PinoyDev


Solution is to use the installer

like image 24
Boas Enkler Avatar answered Oct 23 '22 15:10

Boas Enkler


As suggested, the installer is one way to help resolve the situation.

Since there now exist a full Nuget Package, I will recommend to use that instead. It definitely made the whole install task so much easier.

Install-Package ClearScript.V8 

https://www.nuget.org/packages/ClearScript.V8/

like image 1
Christopher Bonitz Avatar answered Oct 23 '22 16:10

Christopher Bonitz