Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Azure Mobile Services Cannot Load V8 Interface Assembly

$
0
0
Hi again,

Does the Clearscript.dll look for them one level up? If so, it should work.

ClearScript searches for the V8 assemblies as follows:
  • In the directory that contains ClearScript.dll. This is expected to fail in ASP.NET deployments due to shadow copying.
  • In AppDomain.CurrentDomain.BaseDirectory. This should be your deployment root directory, but if the exception message above is correct, it isn't being searched at all. Can you confirm that? Is the exception message exactly as shown above? If possible, try catching the exception in code to see its exact message.
  • In the directories in AppDomain.CurrentDomain.RelativeSearchPath. It looks like there might be a ClearScript bug here (it doesn't combine these paths with the deployment root path), but that shouldn't affect your scenario. Again, please verify the correctness and completeness of the exception message.
Is there anything I could try changing in the Clearscript project, recompiling, and then redploy my Azure service?

There's no need to rebuild ClearScript. You can override the V8 assembly loading procedure by using an assembly resolution hook:
AppDomain.CurrentDomain.AssemblyResolve += (sender, args) => {
    if (args.Name == "ClearScriptV8") {
        return Assembly.LoadFrom(@"C:\Custom\Path\To\ClearScriptV8-32.dll");
    }
    returnnull;
};
Run this code once, at some point before you create your first V8ScriptEngine instance. It should work as long as ClearScriptV8-32.dll and v8-ia32.dll are in the same directory.

Good luck!

Viewing all articles
Browse latest Browse all 2297

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>