Taritsyn/JavaScriptEngineSwitcher

Could not load file or assembly 'file:///D:\home\site\wwwroot\bin\ClearScriptV8.win-x64.dll' or one of its dependencies. Could not find or load a specific file.

DarthSonic opened this issue · 10 comments

  1. The file ClearScriptV8.win-x64.dll is existing in bin path of web app.
  2. JavaScriptEngineSwitcher.V8.Native.win-x64 was deinstalled because of deprecation notice
  3. Microsoft.ClearScript.V8.Native.win-x64 is installed
  4. running locally on IISExpress works
  5. after using Web Publish to deploy to Azure Web App, error is:

Could not load file or assembly 'file:///D:\home\site\wwwroot\bin\ClearScriptV8.win-x64.dll' or one of its dependencies. Could not find or load a specific file.

Hello, Sven!

What versions of the JavaScriptEngineSwitcher.V8 and Microsoft.ClearScript.V8.Native.win-x64 packages do you use?

  1. running locally on IISExpress works
  2. after using Web Publish to deploy to Azure Web App, error is:

Most likely, your deployment script does not copy the ClearScriptV8.win-x64.dll file.

updated to latest versions 3.17.2 and 7.2.2

Apparently, this is a deployment error. You may have to manually edit the deployment script.

  1. running locally on IISExpress works
  2. after using Web Publish to deploy to Azure Web App, error is:

Most likely, your deployment script does not copy the ClearScriptV8.win-x64.dll file.

Meanwhile I figured out a way to solve it:

The file was existing but seems not to be overridden correctly by Web Publish. So I removed bin-folder manually by using App Service Editor (or alternatively Kudu). After the next deploy it worked.

I can remember that happend the last time I updated JavaScriptEngineSwitcher and/or ClearScript package too. Maybe there is some problem with file getting locked and not released as other files in the bin-folder do not have that problem?

In principle, updating of native assemblies always require an restart of IIS or application pool.

For sure, but there is no problem with any other DLL than ClearScriptV8.win-x64.dll.

I will close that issue.

How many of these assemblies are native?

Can't tell you. I did not dive into this that deeply.

It is quite possible that all other assemblies are managed.