Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot load V8 interface assembly. Load failure information for v8-ia32.dll

Tags:

c#

Cannot load V8 interface assembly. Load failure information for v8-ia32.dll: C:\Users\szymarad\AppData\Local\Temp\Temporary ASP.NET Files\vs\506fb4ab\b0850f51\assembly\dl3\28a19a82\00b1e3d3_a5add301\v8-ia32.dll: The specified module could not be found C:\Users\szymarad\source\repos\KTM\Geta-KTM3.0\src\KTM.Web\v8-ia32.dll: The specified module could not be found C:\Users\szymarad\source\repos\KTM\Geta-KTM3.0\src\KTM.Web\bin\v8-ia32.dll: The specified module could not be found

Also installed Microsoft Visual C++ Redistributable for Visual Studio 2017

I have cleared the temp asp.net folder cleaned solution restarted my computer

tried to install microsoft.clearscript but than i get Could not load file or assembly 'ClearScriptV8-32.DLL' or one of its dependencies.

Suggestions?

like image 289
Radek82 Avatar asked Dec 14 '18 05:12

Radek82


1 Answers

The reason ASP .NET looks for that v8-ia32.dll assembly in the bin folder is that by default when you are running a ASP .NET web project, and IIS Express runs at background, it runs in a 32-bit (x86) mode so it would load assemblies or modules in the same mode which are in 32-bit (x86). If you already have installed MS Visual C++ Redistributable for Visual Studio 2017, that is fine but it won't solve the issue.

The solution is to install the Nuget package JavaScriptEngineSwitcher.V8.Native.win-x86 in your ASP .NET project that gives three assemblies after building the ASP .NET project.

Under \bin\x86\ directory:

  • ClearScriptV8-32.dll
  • v8-base-ia32.dll
  • v8-ia32.dll

If you have installed a different package which is the Microsoft.ClearScript only and you do have a JavaScriptEngineSwitcher package, this might cause a trouble but just give it a try to still install package JavaScriptEngineSwitcher.V8.Native.win-x86 to solve the issue.

For a good documentation you can also refer to Taritsyn's documentation. See https://github.com/reactjs/React.NET/issues/409, he gave a detailed instructions to follow and guidelines.

Under the V8 section of his post he said:

"In general, usage of the ClearScript.V8 package together with the JavaScriptEngineSwitcher.V8 is causing errors."

Then he also suggests if you're not sure what to use of the JavaScriptEngineSwitcher.V8.Native.win, you can install both the 32-bit and 64-bit packages.

".NET applications, ASP.NET web applications and sites in 64-bit Windows can run not only in 64-bit processes, but also in 32-bit processes. For correct working of the JavaScriptEngineSwitcher.V8 in 32-bit process need to install the JavaScriptEngineSwitcher.V8.Native.win-x86 package. If you do not know in which process will run your application or web site, then install both packages."

Hope this helps to solve the issue.

like image 121
Jerameel Resco Avatar answered Sep 21 '22 12:09

Jerameel Resco