Skip to content
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

Documentation says JavaScriptEngineSwitcher.V8 needs Visual C++ 2015 Redistributable #37

Closed
saasen opened this issue Jul 19, 2017 · 5 comments

Comments

@saasen
Copy link

saasen commented Jul 19, 2017

Hi.

We've been trying to upgrade this library. We have the following NuGet packages installed:

  • BundleTransformer.AutoPrefixer => 1.9.166
  • BundleTransformer.Core => 1.9.160
  • BundleTransformer.Less => 1.9.160
  • BundleTransformer.MicrosoftAjax => 1.9.160
  • JavaScriptEngineSwitcher.Core => 2.4.10
  • JavaScriptEngineSwitcher.V8 => 2.4.10
  • JavaScriptEngineSwitcher.V8.Native.win-x64 => 2.4.10

However, installing the Microsoft Visual C++ 2015 Redistributable doesn't work.

We had to install the Visual C++ Redistributable Packages for Visual Studio 2013 in order for our application to run correctly. Otherwise it would fail at runtime when loading v8.

Is this the intended behaviour, or should it work with Microsoft Visual C++ 2015 Redistributable?

@Taritsyn
Copy link
Owner

Hello, Anders!

JavaScriptEngineSwitcher.V8.Native.win-x64 => 2.4.10

This version does not exist. Only available version 2.4.2.

Is this the intended behaviour, or should it work with Microsoft Visual C++ 2015 Redistributable?

Native assemblies were compiled by using Visual Studio 2015, therefore they require a Microsoft Visual C++ 2015 Redistributable. It is possible, that in the bin directory remained an old version of the native assemblies. Check a version of the bin/x64/ClearScriptV8-64.dll file (should be version 5.4.9.0).

Also I recommend you to read the “Misconceptions about the JavaScript Engine Switcher version 2.X” discussion.

@saasen
Copy link
Author

saasen commented Jul 20, 2017

Hi Andrey!

I'm sorry for that. My NuGet Package Manager showed the wrong version. Indeed, you are right that the latest package is 2.4.2.

Yes, it seems like the file is the correct version (when building locally):

image

We're building our application on TeamCity. Is it possible that has something to do with it?

I also looked at the server where the application was deployed to, and it seems like it was using the old packages somehow. It was not moved to bin/x64/ClearScriptv8-64.dll, but rather to binClearScriptV8-64.dll and with the old version number 5.4.2.0.

I guess I'll have to look into that. Have you seen this error before?

@Taritsyn
Copy link
Owner

Taritsyn commented Jul 20, 2017

I also looked at the server where the application was deployed to, and it seems like it was using the old packages somehow.

It's not a error, but an old problem with deployment of native assemblies (I've known this problem since days of Classic ASP). Problem is this: process in which the native assemblies were loaded does not allow them to be overwritten. To overwrite the native assemblies need to restart the process. Most often this process is IIS (need to stop/start the website).

It was not moved to bin/x64/ClearScriptv8-64.dll, but rather to bin/ClearScriptV8-64.dll and with the old version number 5.4.2.0.

Most likely the problem in your deployment script.

I recommend you to read the “File lock on LibSassHost.Native-64.dll” discussion.

@saasen
Copy link
Author

saasen commented Jul 20, 2017

You know what. I had indeed a problem in my deployment script. It was picking the wrong package from my feed. It is now working correctly, and indeed we need the vcredist2015 package.

Thanks.

@saasen saasen closed this as completed Jul 20, 2017
@Taritsyn
Copy link
Owner

Excellent!

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