Skip to content

Trying to Run this in the GAC #73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
trevski opened this issue May 21, 2019 · 9 comments
Closed

Trying to Run this in the GAC #73

trevski opened this issue May 21, 2019 · 9 comments

Comments

@trevski
Copy link
Contributor

trevski commented May 21, 2019

I am trying to update to run V8 instead of MSIE. We have an installer which allows all sites on a server to use the same version of bundleTransformer across 100's of websites loading the dlls from the GAC rather than local copies.

The trouble is that when I install the V8 engine, it cannot find the references in the x64 directory, I have tried copying these to the GAC folder and no luck.

Any Ideas

@Taritsyn
Copy link
Owner

Hello, Trevor!

Which assemblies did you try to copy to the GAC?

@Taritsyn
Copy link
Owner

Try copying the following assemblies to the GAC: JavaScriptEngineSwitcher.V8.dll, ClearScript.dll and ClearScriptV8-64.dll. And then copy the v8-base-x64.dll and v8-x64.dll assemblies into the C:\Windows\System32 directory. Also don't forget to install the Microsoft Visual C++ Redistributable for Visual Studio 2017.

@trevski
Copy link
Contributor Author

trevski commented May 21, 2019

Copying v8-base-x64.dll and v8-x64.dll into system32 did not seem to work. However copying then into C:\Windows\Microsoft.NET\assembly\GAC_MSIL\ClearScript\v4.0_5.5.6.0__935d0c957da47c73 did work for me. I just need to figure out how to get my installer to copy the files here... Thanks

@Taritsyn
Copy link
Owner

I created a corresponding issue #117 “How do I deploy a 64-bit ClearScriptV8 assemblies globally (at the machine level)?” in the ClearScript's repository.

@Taritsyn
Copy link
Owner

Try renaming the ClearScriptV8-64.dll assembly to the ClearScriptV8.dll.

@Taritsyn
Copy link
Owner

Just want to warn:

  1. ClearScript's assemblies from my packages (JavaScriptEngineSwitcher.V8, JavaScriptEngineSwitcher.V8.Native.win-x86 and JavaScriptEngineSwitcher.V8.Native.win-x64) are different from the assemblies of the official package, i.e. they have other strong names.
  2. Dynamic loading of native assemblies is also different from the official one (see the AssemblyResolver.cs file).

@Taritsyn
Copy link
Owner

If with the ClearScriptV8 library doesn't work out, then I recommend you to switch to the JavaScriptEngineSwitcher.ChakraCore module.

In this case, you must perform the following steps:

  1. Install the Microsoft Visual C++ Redistributable for Visual Studio 2017.
  2. Register the JavaScriptEngineSwitcher.ChakraCore.dll assembly from the JavaScriptEngineSwitcher.ChakraCore package in the GAC.
  3. Copy the ChakraCore.dll assembly from the JavaScriptEngineSwitcher.ChakraCore.Native.win-x64 package to the C:\Windows\System32 directory.

@Taritsyn
Copy link
Owner

Hello, Trevor!

Authors of the ClearScript answered me. While I recommend switching to the JavaScriptEngineSwitcher.ChakraCore module.

@Taritsyn
Copy link
Owner

Taritsyn commented Aug 5, 2019

Hello, Trevor!

Install a latest versions of packages:

Install-Package JavaScriptEngineSwitcher.V8 -Version 3.1.6
Install-Package JavaScriptEngineSwitcher.V8.Native.win-x86 -Version 3.1.5
Install-Package JavaScriptEngineSwitcher.V8.Native.win-x64 -Version 3.1.5

Also don't forget to install the Microsoft Visual C++ Redistributable for Visual Studio 2017.

Install into GAC the following assemblies: AdvancedStringBuilder.dll, JavaScriptEngineSwitcher.Core.dll, JavaScriptEngineSwitcher.V8.dll, ClearScript.dll, ClearScriptV8-32.dll and ClearScriptV8-64.dll.

And then copy to the C:\Windows\System32 directory (admin rights required) the native assemblies: v8-libcpp-ia32.dll, v8-base-ia32.dll, v8-ia32.dll, v8-libcpp-x64.dll, v8-base-x64.dll and v8-x64.dll.

To deploy the above assemblies I used the following commands running in the Developer Command Prompt for VS 2017 with administrator rights:

cd YOUR_APP_BIN_DIRECTORY

gacutil -i AdvancedStringBuilder.dll
gacutil -i JavaScriptEngineSwitcher.Core.dll
gacutil -i JavaScriptEngineSwitcher.V8.dll
gacutil -i ClearScript.dll
gacutil -i ClearScriptV8-32.dll
gacutil -i ClearScriptV8-64.dll

copy v8-libcpp-ia32.dll "%WINDIR%\system32\*.*"
copy v8-base-ia32.dll "%WINDIR%\system32\*.*"
copy v8-ia32.dll "%WINDIR%\system32\*.*"
copy v8-libcpp-x64.dll "%WINDIR%\system32\*.*"
copy v8-base-x64.dll "%WINDIR%\system32\*.*"
copy v8-x64.dll "%WINDIR%\system32\*.*"

It all worked on my computer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants