1

I am using ReactJs.NET in a ASP.NET MVC 4 project. I have disabled the fallback to MSIE javascript engine by specifying this in my ReactConfig.cs that is called on app start:

ReactSiteConfiguration.Configuration.SetAllowMsieEngine(false);

This works on my developer machine but not in production. The exception that is thrown is:

Failed to initialise ClearScript V8. This is most likely caused by the native libraries (ClearScriptV8-64.dll and v8-x64.dll) missing from your app's Bin directory, or the Visual C++ runtime not being installed

I have ensured that the ClearScript.V8 folder (with ClearScriptV8-64.dll and v8-x64.dll) is copied across to the production server and the bin folder so I am currently looking at whether the Visual C++ runtime is missing or not. I downloaded and installed the Visual C++ Redistributable for Visual Studio 2015 located here: https://www.microsoft.com/en-us/download/details.aspx?id=48145 but the same exception is thrown.

Is there something obvious I am missing here? Is it the wrong Visual C++ runtime that I have installed?

2 Answers 2

1

Are those DLL files in a ClearScript.V8 folder? They need to be at bin\ClearScript.V8\ClearScriptV8-64.dll for example.

Alternatively, you can try out the release candidate of ReactJS.NET 3.0, which uses a newer version of JavaScriptEngineSwitcher that changes how V8 is loaded and no longer requires the DLL files to be manually copied over. There's currently no documentation on ReactJS.NET 3.0 but it's pretty similar to the current 2.x version. I'll be working on the documentation for the final release soon.

Sign up to request clarification or add additional context in comments.

1 Comment

Yes all the neccesary files are copied to bin\ClearScript.V8. Thanks for your reply! I actually managed to find the answer in your Github for reactjs.net :) See my answer below.
1

In my case I managed to resolve this by installing the Visual C++ 2013 runtime, this was the only version that actually worked in this case. I had no luck with neither 2012 or 2015.

I found the answer here:

https://github.com/reactjs/React.NET/issues/80

and the comment that helped me was:

Just another note, ClearScript 5.4.4 readme says VS2015 or 2013 C++ runtimes will work, but in my experience, it only worked when 2013's was present.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.